Page 67 - Computer_Science_F5
P. 67
Computer Science Step 3: Add program instructions
(a) Select "instructions" from the CPU simulator interface. Click "ADD NEW…"
button to add a new instruction, and use "EDIT…" button to edit the selected
instruction.
FOR ONLINE READING ONLY
Figure 1.55: Adding a program instruction
(b) Create an "instruction", which moves the "first number" (in this example
use 15) to register R00. To do this, click the "ADD NEW…button" in the
instruction window and select "Data Transfer", then select "MOV function",
add first number, that is 15, in the "source operand" value box and select "R00"
from the drop down menu of the register in the "Destination Operand". Click
"NEW INSTRUCTION" for the instruction created to appear in the "CPU
INSTRUCTIONS IN MEMORY(RAM)".
58
for Advanced Secondary Schools
Computer Science Form 5.indd 58 23/07/2024 12:32