Page 69 - Computer_Science_F5
P. 69
Computer Science (f) Create an instruction, which adds the contents of R00 and R01 and store the
results in R02. In the instruction interface, click "Arithmetic" then select
"ADD function". Select R00 in the register of the Source Operand and R02 in
the register of the Destination Operand and click "NEW INSTRUCTION".
FOR ONLINE READING ONLY
Figure 1.58: Creating instructions for adding and storing contents
(g) Create an instruction, that pushes the result value in the register to the
"program stack(Random Access Memory)", and then "execute" it. Click
the Data Transfer button and select "PSH function". Then, select R02 in the
register of the Source Operand, click "NEW INSTRUCTION" and observe
the value in the "Program Stack(RAM)".
Figure 1.59: Creating a program that pushes the result value in the
register to the program stack(RAM) and then execute it
60
for Advanced Secondary Schools
Computer Science Form 5.indd 60 23/07/2024 12:32