(Work in progress)
Opcode Table
Address Modes
DEST | SRC | MODE | ie. |
r | r | Register | mov c, a |
r | (r) | Register Indirect | mov c, (a) |
r | imm | Immediate Direct | mov a, 0x55 |
r | (imm) | Immediate Indirect | mov a, $ffa3 |
r16 | r16 | Register | mov f, s3 |
r16 | (r16) | Register Indirect | mov f, (s3) |
r16 | rr | Register Pair | mov s3, s1s2 |
r16 | (rr) | Register Pair Indirect | mov f, (CD) |
r16 | imm | imm16 | Immediate Direct | mov s3, 0x55 |
r16 | (imm) | (imm16) | Immediate Indirect | mov f, (0x55a3) |
mem | r | r16 | Register | mov $ff12, a |
mem | (r) | (r16) | Register Indirect | mov $223a, (a) |
mem | rr | Register Pair | mov $ff12, (cd) |
mem | (rr) | Register Pair Indirect | mov $332a, (s1s2) |
mem | imm | imm16 | Immediate | mov $aad5, 0x55f1 |
mem | (imm) | (imm16) | Indirect | mov $779a, (0xd771) |
Registers
Name | Acronym | Type | Description |
C & D Registers | C, D | 8-bit GPR | User-controlled |
Scratch Registers | S1, S2 | 8-bit GPR | Internal Use Only |
F Register | F | 16-bit GPR / Counter | User-controlled |
Scratch Register | S3 | 16-bit GPR / Counter | Internal Use Only |
Instruction Register | IR | 16-bit Counter Register | Internal Use Only |
Stack Pointer | SP | 16-bit Counter Register | User-controlled |
Program Counter | PC | 16-bit Counter Register | Internal Use Only |
Code Segment Register | CS | 4-bit Register | Internal Use Only |
Data Segment Register | DS | 4-bit Register | User-controlled |
Stack Segment Register | SS | 4-bit Register | User-controlled |
Flags Register | FLG | 4-bit Register | Internal Use & User-controlled |
Accumulator | A | 8-bit Register | User-controlled |
Operand | B | 8-bit Register | User-controlled |
Memory Address | MAR | 16-bit Register | Internal Use Only |
Interrupt Mask Register | IMR | 8-bit Register | User-controlled |
Interrupt Priority Register | PR | 8-bit Register | User-controlled |
Instruction List
Instructions
RST | NOP | HLT | MOV | PUSH | POP |
ADD | ADC | SUB | SBB | AND | NAND |
OR | NOR | XOR | XNOR | NOT | SHL |
SHR | ASL | ASR | ROL | ROR | INC |
DEC | CMP | TST | IN | OUT | CALL |
CLI | RTS | RTI |
Jump Instructions
JMP | JS | JNB | JAE | JNC | JO | JE | JZ | JS |
JB | JNAE | JC | JA | JNBE | JGE | JNL | JG | JNLE | JL | JNGE | JBE | JNA |
JLE | JNG |