Line 287... |
Line 287... |
When HOLD is no longer needed, it should just be turned low and an extra clock cycle should be waited on for it to return to RESET state
|
When HOLD is no longer needed, it should just be turned low and an extra clock cycle should be waited on for it to return to RESET state
|
When RESET is held low, the processor will execute. It takes 3 clock cycles for the processor to "catch up" to actually executing instructions
|
When RESET is held low, the processor will execute. It takes 3 clock cycles for the processor to "catch up" to actually executing instructions
|
|
|
|
|
|
|
|
Register order:
|
|
The order of registers is read from left to right with left being the most significant bit of the 16-bit opcode.
|
|
So for instance,
|
|
0101_*000*0_0*111*_0010 is `mov [r0], IP/r7`. The register portions of the opcode are surrounded by astericks
|
|
|
|
|
Implemented opcode list:
|
Implemented opcode list:
|
legend:
|
legend:
|
r = register choice
|
r = register choice
|
Line 299... |
Line 302... |
C = conditional portion
|
C = conditional portion
|
s = segment register choice
|
s = segment register choice
|
i = immediate data
|
i = immediate data
|
N = not used
|
N = not used
|
o = opcode choice (for groups)
|
o = opcode choice (for groups)
|
|
_ = space for readability
|
|
|
0000 rrrC iiii iiii
|
0000_rrrC_iiii_iiii
|
mov reg, immediate
|
mov reg, immediate
|
|
|
0001 rrrC iiii iiii
|
0001_rrrC_iiii_iiii
|
mov [reg], immediate
|
mov [reg], immediate
|
|
|
group 3 comparions
|
group 3 comparions
|
0011 rrrC Crrr Nooo
|
0011_rrrC_Crrr_Nooo
|
opcode choices
|
opcode choices
|
000: is greater than reg1,reg2 (TR=reg1>reg2)
|
000: is greater than reg1,reg2 (TR=reg1>reg2)
|
001: is greater or equal to reg,reg
|
001: is greater or equal to reg,reg
|
010: is less than reg,reg
|
010: is less than reg,reg
|
011: is less than or equal to reg,reg
|
011: is less than or equal to reg,reg
|
Line 319... |
Line 323... |
101: is not equal to reg,reg
|
101: is not equal to reg,reg
|
110: equals 0 reg
|
110: equals 0 reg
|
111: not equals 0 reg
|
111: not equals 0 reg
|
|
|
group 4 bitwise
|
group 4 bitwise
|
0100 rrrC Crrr Nooo
|
0100_rrrC_Crrr_Nooo
|
opcode choices
|
opcode choices
|
000: and reg1,reg2 (reg1=reg1 and reg2)
|
000: and reg1,reg2 (reg1=reg1 and reg2)
|
001: or reg, reg
|
001: or reg, reg
|
010: xor reg,reg
|
010: xor reg,reg
|
011: not reg1,reg2 (reg1=not reg2)
|
011: not reg1,reg2 (reg1=not reg2)
|
Line 331... |
Line 335... |
101: right shift reg,reg
|
101: right shift reg,reg
|
110: rotate right reg,reg
|
110: rotate right reg,reg
|
111: rotate left reg,reg
|
111: rotate left reg,reg
|
|
|
group 5 misc
|
group 5 misc
|
0101 rrrC CRRR sooo
|
0101_rrrC_CRRR_sooo
|
opcode choices:
|
opcode choices:
|
000: subgroup 5-0
|
000: subgroup 5-0
|
RRR choices:
|
RRR choices:
|
000: push reg
|
000: push reg
|
001: pop reg
|
001: pop reg
|
|
|
001: mov reg, reg
|
001: mov reg, reg
|
|
010: mov reg, [reg]
|
|
011: mov [reg], reg
|
|
|