mirror of
https://github.com/toyoshim/Applerm-II.git
synced 2024-10-31 11:08:32 +00:00
Bug fix: adc and sbc performed wrong carry flag calculation
This commit is contained in:
parent
86d07009b1
commit
064567f346
5
6502.S
5
6502.S
@ -12,6 +12,7 @@
|
||||
.extern prn
|
||||
.macro prn reg
|
||||
push {r0-r3}
|
||||
mov r0, \reg
|
||||
bl prn
|
||||
pop {r0-r3}
|
||||
.endm
|
||||
@ -367,7 +368,7 @@
|
||||
beq 1f
|
||||
__se FLAG_N
|
||||
1:
|
||||
lsrs r1, r1, #17
|
||||
lsrs r1, r1, #9
|
||||
bcc 1f
|
||||
__se FLAG_C
|
||||
1:
|
||||
@ -626,7 +627,7 @@
|
||||
beq 1f
|
||||
__se FLAG_N
|
||||
1:
|
||||
lsrs r1, r1, #17
|
||||
lsrs r1, r1, #9
|
||||
bcs 1f
|
||||
__se FLAG_C
|
||||
1:
|
||||
|
Loading…
Reference in New Issue
Block a user