LOAD Instruction Property 3

The load (LOAD) instruction copies a value from one memory cell to another. When the LOAD instruction is executed, the Program Counter (PC) is always incremented by 1. More formally:

if the following are true:
  • instruction #x is load dst=s addr=d imm=imm
  • the PC at time t = x

then the PC at time (t + 1) = x + 1

In this example, the LOAD instruction sets memory cell #5 to 7. 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 load dst=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