Opcode Table - Jimmer1/Chip16 GitHub Wiki
I have compiled this opcode table for ease of reference.
| Opcode Mnemonic | Opcode | Opcode Behaviour | Opcode Cycle Count |
|---|---|---|---|
| ACR | 6XNN | R[X] |
1 |
| AR | 8XY0 | R[X] |
1 |
| ADD | 8XY4 | R[X] R[15] |
1 |
| ADC | 7XNN | R[X] |
1 |
| SUB | 8XY5 | R[X] R[15] |
1 |
| RSUB | 8XY7 | R[X] R[15] |
1 |
| OR | 8XY1 | R[X] |
1 |
| AND | 8XY2 | R[X] |
1 |
| XOR | 8XY3 | R[X] |
1 |
| NOT | 8X0F | R[X] |
1 |
| SHR | 8XY6 | R[X] R[15] |
1 |
| SHL | 8XYE | R[X] R[15] |
1 |
| GOTO | 1NNN | PC |
1 |
| CPAC | BNNN | PC |
2 |
| SNEC | 3XNN | if (R[X] |
2 |
| SNUEC | 4XNN | if (R[X] |
2 |
| SNE | 5XY0 | if (R[X] |
2 |
| SNUE | 9XY0 | if (R[X] |
2 |
| CALL | 2NNN | push(PC); PC |
3 |
| RET | 01EE | PC |
2 |
| CALLR | EX1C | push(PC); PC |
3 |
| SMP | ANNN | M |
1 |
| RMP | EX1D | R[X] |
1 |
| MPAR | EX1E | M |
1 |
| SPL | EX55 | *M |
3 |
| LD | EX65 | R[X] |
3 |
| BAR | CXNN | R[X] |
16 |
| HALT | 0000 | Program stop | 1 |
| SBC | DXNN | R[X] |
1 |
Note: Device opcodes have been omitted because it cannot be known how long each device will take to perform each instruction.