Program Execute
The PC (Program Counter) points at the next instruction to be executed, which may, depending on its opcode: load a value directly into the high bits of a register, load a value directly into the low bits of a register, load a value from an address offseted to the SP (Segment Pointer), store a value from a register to an address offseted to the SP (Segment Pointer), or perform an arithmetic operation on one or more registers potentially storing the result in another register.
Register | Value |
---|---|
PC | 0000 0000 0000 0000 0000 0000 0000 0000 |
SP | 0000 0000 0000 0000 0000 0000 0000 0000 |
FP | 0000 0000 0000 0000 0000 0000 0000 0000 |
R1 | 0000 0000 0000 0000 0000 0000 0000 0000 |
R2 | 0011 0101 0111 1100 1110 0010 0110 0110 |
R3 | 0000 0000 0000 0000 0000 0000 0000 0000 |
R4 | 0000 0000 0000 0000 0000 0000 0000 0000 |
R5 | 0000 0000 0000 0000 0000 0000 0000 0000 |
|
|
[0000 0000 0000 0000 0000 0000 0000 0000] [Opcode... Reg Reg Reg Spr Spr Spr ] [Opcode... Reg Address offset to SP ] [Opcode... Reg Value ] 0001 Add $r1 $r2 $r3 Spare 0011 Sub $r1 $r2 $r3 Spare 0010 Div $r1 $r2 $r3 Spare 0011 Mul $r1 $r2 $r3 Spare 8 4 4 4 12 1001 LoadDH $r? $value 1010 LoadDL $r? $value 1011 Load $r? $addr (address added to SP) 1100 Store $r? $addr (address added to SP) 1101 Jmp $r? (set PC = register) 8 4 20 |
Address | Value stored at address |
---|---|
32 bit address | 32 bit value |
0x0000 0000 | 0000 1001 1010 0000 0000 0000 0000 0000 |
0x0000 0004 | 0000 1010 1010 0000 0000 0000 0000 0000 |
0x0000 0008 | 0000 1001 0010 0000 0000 0000 0001 0000 |
0x0000 0012 | 0000 1101 0001 0000 0000 0000 0000 0000 |
0x0000 0016 | 0011 0101 0111 1100 1110 0010 0110 0110 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
0x0000 0000 | 0000 0000 0000 0000 0000 0000 0000 0000 |
... | |
0xFFFF FFFF |
References