Fixed Carry handling in SBC opcode.
This commit is contained in:
@@ -312,7 +312,7 @@ static unsigned HaveIRQRequest;
|
|||||||
SET_CF (res <= 0xFF); \
|
SET_CF (res <= 0xFF); \
|
||||||
SET_OF (((old^rhs) & (old^res) & 0x80)); \
|
SET_OF (((old^rhs) & (old^res) & 0x80)); \
|
||||||
} else { \
|
} else { \
|
||||||
Regs.AC -= rhs - (!GET_CF ()); \
|
Regs.AC -= rhs + (!GET_CF ()); \
|
||||||
TEST_ZF (Regs.AC); \
|
TEST_ZF (Regs.AC); \
|
||||||
TEST_SF (Regs.AC); \
|
TEST_SF (Regs.AC); \
|
||||||
SET_CF (Regs.AC <= 0xFF); \
|
SET_CF (Regs.AC <= 0xFF); \
|
||||||
|
|||||||
Reference in New Issue
Block a user