summary refs log tree commit diff
path: root/instructions/INX.ts
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2025-04-02 12:24:10 +0300
committerWlodekM <[email protected]>2025-04-02 12:24:10 +0300
commitb9cd32d22d20f3fd5e44dd738d7e1bdbdeabc9e0 (patch)
treeaf89604aa85adbde67ba844686e035416446f7c8 /instructions/INX.ts
parent1027b91f357eaaa4793b9d16673b0ab662b37c7e (diff)
big update
Diffstat (limited to 'instructions/INX.ts')
-rw-r--r--instructions/INX.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/instructions/INX.ts b/instructions/INX.ts
new file mode 100644
index 0000000..9c1cc1b
--- /dev/null
+++ b/instructions/INX.ts
@@ -0,0 +1,15 @@
+import type The65c02 from "../65c02.ts";
+
+export default function (this: The65c02, mode: string) {
+    switch (mode) {
+        case 'implied':
+            this.regX.increment()
+            this.negative = this.regX.bit(7);
+            this.zero = this.regX.num() == 0;
+            this.programCounter.increment();
+            break;
+    
+        default:
+            throw 'wha';
+    }
+}
\ No newline at end of file