summary refs log tree commit diff
path: root/instructions/DEC.ts
diff options
context:
space:
mode:
Diffstat (limited to 'instructions/DEC.ts')
-rw-r--r--instructions/DEC.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/instructions/DEC.ts b/instructions/DEC.ts
index 2f9d7a9..19f40f9 100644
--- a/instructions/DEC.ts
+++ b/instructions/DEC.ts
@@ -1,6 +1,12 @@
 import type The65c02 from "../65c02.ts";
 
 export default function (this: The65c02, mode: string) {
+    if (mode == 'implicit') {
+        this.flagZN(this.regA.num() - 1)
+        this.regA.decrement();
+        this.programCounter.increment()
+        return;
+    }
     const addr = this.getAddr(mode);
     this.io.address.set(addr);
     this.read();