summaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-11-20 15:10:24 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2020-11-20 15:10:24 -0500
commit83ce1151ee1f06ae6b1c5c1018cc2489494e5ea4 (patch)
treeba4edade46c57ec5119d01ab8a7ad9f7943c6804 /opcode.h
parentdc7ebb9d424bb39d59f09b8498746beb871c46f4 (diff)
- Implemented support for Sux's base extension.
This is the biggest milestone I've reached for this project, since the base extension changes alot about what Sux can do by default, and now makes it a viable instruction set for modern day use, when compared with other instruction sets.
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/opcode.h b/opcode.h
index 4c5d585..40b832f 100644
--- a/opcode.h
+++ b/opcode.h
@@ -10,6 +10,7 @@
#define keypoll 0
#define OPNUM 74
+#define EXT_OPNUM 49
#define C (1 << 0) /* Carry flag. */
#define Z (1 << 1) /* Zero flag. */
@@ -55,10 +56,10 @@ union reg {
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 pc; /* Program counter. */
uint64_t sp; /* Stack pointer. */
uint64_t clk; /* Number of clock cycles. */
- uint8_t crt; /* Current running threads. */
};
extern int asmmon();