This commit is contained in:
d0p1 🏳️‍⚧️ 2024-02-23 01:35:53 +01:00
parent b5c3e7f930
commit f9af0db237
2 changed files with 6 additions and 14 deletions

View file

@ -118,7 +118,7 @@ decode_imm(uint8_t opcode)
fprintf(output, "W #$%hX\n", readu16());
break;
case 0x2:
fprintf(output, "D #$%X\n", readu32());
fprintf(output, "L #$%X\n", readu32());
break;
default:
break;

View file

@ -34,6 +34,8 @@ Status register flags
*** Implied Addressing
*** Remative Addressing
*** Immediate Addressing
A size and a literal operand is given immediately after the instruction.
@ -41,7 +43,9 @@ A size and a literal operand is given immediately after the instruction.
#+begin_src asm
LDA.B #7
LDA.W #300
LDA.D #$DEADBEEF
LDA.L #$DEADBEEF
LDA.SB #-5 ! sign extended
LDA.SW #-5367 ! sign extended
#+end_src
*** Absolute Addressing
@ -85,15 +89,3 @@ A size and a literal operand is given immediately after the instruction.
|--------|------|-------|
| opcode | attr | value |
* Instruction Set
| OP | ATTR | IMM | Size | Note |
|----|------|----------|------|-------------------------------------|
| 00 | | | 1 | Break |
| 01 | | XXXX | 3 | Or with accumulator |
| 08 | | | 1 | Push processor status |
| 09 | 01 | XX | 3 | Or with accumulator |
| 09 | 02 | XXXX | 4 | Or with accumulator |
| 09 | 03 | XXXXXXXX | 6 | Or with accumulator |
| 0A | | | 1 | Shift Left One Bit with accumulator |
| 10 | | XXXX | 3 | Branch on plus |