aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_emu/opcodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'atk16_emu/opcodes.py')
-rw-r--r--atk16_emu/opcodes.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/atk16_emu/opcodes.py b/atk16_emu/opcodes.py
new file mode 100644
index 0000000..268c873
--- /dev/null
+++ b/atk16_emu/opcodes.py
@@ -0,0 +1,38 @@
+from typing import Literal
+from dataclasses import dataclass
+
+Opcode = Literal[
+ "ALR",
+ "ALI",
+ "LDR",
+ "STR",
+ "LDI",
+ "JPR",
+ "JPI",
+ "BRR",
+ "BRI",
+ "LPC",
+ "NOP",
+ "ISRP0",
+ "ISRP1",
+ "RTI",
+ "HLT",
+]
+
+@dataclass
+class ALR():
+ target: int
+ left: int
+ right: int
+ alu_code: int
+
+@dataclass
+class ALI():
+ target: int
+ left: int
+ imm: int
+ alu_code: int
+
+@dataclass
+class HLT():
+ pass