Bug fix on sbc, C was reversed, and result was not stored on V=0

This commit is contained in:
Takashi Toyoshima 2014-12-07 15:02:40 +09:00
parent 8ff302aaf0
commit c3c8eafc07
1 changed files with 2 additions and 1 deletions

3
6502.S
View File

@ -605,7 +605,7 @@
__se FLAG_N
1:
lsrs r1, r1, #17
bcc 1f
bcs 1f
__se FLAG_C
1:
mov r1, RA
@ -615,6 +615,7 @@
lsrs r0, r0, #8
bcc 1f
__se FLAG_V
1:
mov RA, r2
adds PC, PC, #1
.endm