summary refs log tree commit diff
path: root/instructions/DEC.ts
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2025-04-03 10:29:58 +0300
committerWlodekM <[email protected]>2025-04-03 10:29:58 +0300
commitc50e619bef9ecd2266ee904b87c6401cb0572660 (patch)
tree4b25b2daba31d9f542ed5dcb3d61e95c5d186bec /instructions/DEC.ts
parent22bf543c4feca33cfcd68c57de516761bb64a553 (diff)
fix stuff
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();