STORE Instruction Property 3
The store (STORE) instruction copies a value from one memory cell to another. When the STORE instruction is executed, the Program Counter (PC) is always incremented by 1. More formally:
if the following are true:
- instruction #x is
store src=s addr=d imm=imm
- the PC at time t = x
then the PC at time (t + 1) = x + 1
In this example, the STORE instruction sets memory cell #4 to 9. The PC is incremented by 1.
Instructions
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
LW Computer Simulator
This example can be expressed as:
if the following are true:
- instruction #0 is
store src=5 addr=1 imm=1
- the PC at time 0 = 0
then the PC at time (0 + 1) = 0 + 1
Comments
Please log in to add comments