diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2019-12-19 01:02:09 -0500 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2019-12-19 01:07:44 -0500 |
commit | 3029d54edf8baabb2841f9a6f3d88bfc993ae3e8 (patch) | |
tree | a6d13de021ef642eeefcc3d0804764d86f72365d /opcode.h | |
parent | ca5f89b8f043b180c26ef2494cab52121ba97328 (diff) |
Added the B register, which is used for storing the
remainder during a DIV instruction.
I also added the TAB, and TBA instructions, for
transfering between the Accumulator, and the
B register.
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -29,6 +29,7 @@ #define ANX 0x24 /* bitwise ANd with X register. */ #define AAX 0x25 /* bitwise And with Accumulator, and X register. */ #define STT 0x28 /* STart Threads. */ +#define TAB 0x2C /* Transfer Accumulator to B. */ #define TSX 0x2E /* Transfer Stack pointer to X. */ #define BPO 0x30 /* Branch if POsitive. */ #define ORA 0x31 /* bitwise OR with Accumulator. */ @@ -37,6 +38,7 @@ #define ORX 0x34 /* bitwise OR with X register. */ #define OAX 0x35 /* bitwise Or with Accumulator, and X register. */ #define SEI 0x38 /* SEt Interupt flag. */ +#define TBA 0x3C /* Transfer B to Accumulator. */ #define TXS 0x3E /* Transfer X to Stack pointer. */ #define BNG 0x40 /* Branch if NeGative. */ #define XOR 0x41 /* bitwise XOR with accumulator. */ @@ -108,7 +110,7 @@ uint8_t ibcount; /* Number of bytes taken up by instruction. */ struct sux { uint64_t ps; /* The processor status register. */ - uint64_t a[8], y[8], x[8]; /* Registers A, X, and Y. */ + uint64_t a[8], b[8], y[8], x[8]; /* Registers A, B, X, and Y. */ uint64_t pc[8]; /* Program counter. */ uint16_t sp[8]; /* Stack pointer. */ uint16_t stk_st[8]; /* Starting address of each threads stack. */ @@ -160,6 +162,7 @@ static const char *opname[0x100] = { OPNAME(TSX), [0x29] = "AND a", [0x2B] = "AND zm", + OPNAME(TAB), OPNAME(BPO), [ORA] = "ORA #", [ORY] = "ORY #", @@ -170,6 +173,7 @@ static const char *opname[0x100] = { OPNAME(TXS), [0x39] = "ORA a", [0x3B] = "ORA zm", + OPNAME(TBA), OPNAME(BNG), [XOR] = "XOR #", [XRY] = "XRY #", |