From fc941d309a0dbdf977480e817ca4e195e39e175b Mon Sep 17 00:00:00 2001 From: astoria-d Date: Sat, 23 Mar 2013 21:29:05 +0900 Subject: [PATCH] cmp bug fix. --- emulator/6502core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/6502core.c b/emulator/6502core.c index 4a3eb1e..521a703 100644 --- a/emulator/6502core.c +++ b/emulator/6502core.c @@ -832,7 +832,7 @@ static void set_negative(unsigned char data) { } static void set_CMP_carry(unsigned char data, unsigned char cmp) { - if (data - cmp >= 0) + if (data >= cmp) cpu_reg.status.carry = 1; else cpu_reg.status.carry = 0; -- 2.11.0