aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_emu/opcodes.py
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-02-21 12:02:14 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2024-02-21 12:02:14 +0200
commita0b4a1a6107e4dc905b21858d8ac76c47293cfb4 (patch)
treef7ec4d592a6ee7bf6f1e61ef805643c83fedf740 /atk16_emu/opcodes.py
parent549901c85044b6ccd912688d6be007c2fdacc6c6 (diff)
Add emu
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