From c3c8eafc070d007732946f42f12e66fc47ba3832 Mon Sep 17 00:00:00 2001 From: Takashi Toyoshima Date: Sun, 7 Dec 2014 15:02:40 +0900 Subject: [PATCH] Bug fix on sbc, C was reversed, and result was not stored on V=0 --- 6502.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/6502.S b/6502.S index ba09a2b..f4a2370 100644 --- a/6502.S +++ b/6502.S @@ -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