diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-12-08 10:42:10 -0500 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-12-08 11:16:13 -0500 |
commit | 673efacc37efa90e61eba224efadbb4be863c77b (patch) | |
tree | 9b22d4c8b12a5d5b07329df121a13116cb98c4a1 /opcode.h | |
parent | 96393257a43ac52f2b911594d106741245dec5f0 (diff) |
- Implemented support for the Orthogonal extension into
both the assembler, and the emulator.
I finally figured out how I could get support for the
Ortho extension implemented into the old assembler.
The only reason for doing this, is to buy me some
while I start work on the new assembler, and to help
me get an idea for how to do the same in the new
assembler.
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -58,11 +58,25 @@ struct sux { union reg ps; /* The processor status register. */ uint64_t a, b, y, x; /* Registers A, B, X, and Y. */ uint64_t e; /* Effective address register. */ + uint64_t c, d, s, f; /* Registers C, D, S, and F. */; uint64_t pc; /* Program counter. */ uint64_t sp; /* Stack pointer. */ + uint64_t bp; /* Base pointer. */ + uint64_t r11, r12, r13, r14, r15; /* Registers R11-R15. */; uint64_t clk; /* Number of clock cycles. */ }; +typedef struct op operand; + +struct op { + uint8_t type; /* Operand Type. 0 = register, 1 = memory. */ + uint8_t id; /* Operand Type ID 1. 4 bits. */ + uint8_t rind[2]; /* Register(s) used for register indirect. */ + uint8_t scale; /* Scale used for SIB. */ + int is_ind : 1; /* Flag used to determine if this operand is an indirect mode. */ + uint64_t value; /* Value of operand (used only by memory operands). */ +}; + extern int asmmon(); enum sw_type {RS, AM, BYTE}; |