Skip to content

Commit 84492a8

Browse files
philpemghidra1
authored andcommitted
GP-1109 Fix 6502 SBC carry handling (Closes #3190, Closes #3189)
1 parent a3846c3 commit 84492a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ghidra/Processors/6502/data/languages/6502.slaspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ ADDRI: imm16 is imm16 { tmp:2 = imm16; export *:2 tmp; }
420420
:SBC OP1 is (cc=1 & aaa=7) ... & OP1
421421
{
422422
local op1 = OP1;
423-
local result = A - op1 - C;
423+
local result = A - op1 - !C;
424424

425425
subtraction_flags1(A, op1, result);
426426
A = result;

0 commit comments

Comments
 (0)