Skip to main content

Example Instruction

The following example follows the process of data in the processor. The following is the contents of main memory.

Location Contents Description
0 LD Acc, 5 ;Load the accumulator with the contents of memory location 5
1 INC Acc ;Increment the accumulator
2 STO 6, Acc ;Store the value in the accumulator into memory location 6
3 LD B, [9] ;Use indirect addressing to load a value into general register B
4 7
5 8
6 28
7 23
8 46
9 5


Using the above memory fragment and the knowledge that the program counter contains the value 0 we can follow the movement of data in the CPU.

The following shows only the movement of data. Although not explicitly shown, values stay in their respective registers until overwritten.

Next: First Instruction