mirror of
https://github.com/toyoshim/Applerm-II.git
synced 2024-05-31 15:41:29 +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
|
.extern prn
|
||||||
.macro prn reg
|
.macro prn reg
|
||||||
push {r0-r3}
|
push {r0-r3}
|
||||||
|
mov r0, \reg
|
||||||
bl prn
|
bl prn
|
||||||
pop {r0-r3}
|
pop {r0-r3}
|
||||||
.endm
|
.endm
|
||||||
|
@ -367,7 +368,7 @@
|
||||||
beq 1f
|
beq 1f
|
||||||
__se FLAG_N
|
__se FLAG_N
|
||||||
1:
|
1:
|
||||||
lsrs r1, r1, #17
|
lsrs r1, r1, #9
|
||||||
bcc 1f
|
bcc 1f
|
||||||
__se FLAG_C
|
__se FLAG_C
|
||||||
1:
|
1:
|
||||||
|
@ -626,7 +627,7 @@
|
||||||
beq 1f
|
beq 1f
|
||||||
__se FLAG_N
|
__se FLAG_N
|
||||||
1:
|
1:
|
||||||
lsrs r1, r1, #17
|
lsrs r1, r1, #9
|
||||||
bcs 1f
|
bcs 1f
|
||||||
__se FLAG_C
|
__se FLAG_C
|
||||||
1:
|
1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user