summary refs log tree commit diff
path: root/instructions/ADC.ts
diff options
context:
space:
mode:
Diffstat (limited to 'instructions/ADC.ts')
-rw-r--r--instructions/ADC.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/instructions/ADC.ts b/instructions/ADC.ts
index 5e00f15..cfb9f73 100644
--- a/instructions/ADC.ts
+++ b/instructions/ADC.ts
@@ -5,7 +5,7 @@ export default function (this: The65c02, mode: string) {
     this.io.address.set(addr);
     this.read()
     const mem = this.io.data.num();
-    const result = this.regA.num() + mem
+    const result = this.regA.num() + mem + +this.carry
     this.flagZCN(result);
     this.regA.set(result & 0xFF);
 }
\ No newline at end of file