diff --git a/cpu.c b/cpu.c index a4be93c..a3b622e 100644 --- a/cpu.c +++ b/cpu.c @@ -204,7 +204,8 @@ ASL(uint16_t mem) memwrite(mem, tmp & 0xFF); regs.status.carry = tmp > 0xFF; - STATUS_UPDATE_NZ(tmp); + regs.status.negative = (tmp & (1 << 7)) != 0; + regs.status.zero = (tmp << 1 & 0xFF) == 0; } void @@ -536,7 +537,7 @@ ROL(uint16_t mem) memwrite(mem, tmp); regs.status.carry = carry; - STATUS_UPDATE_NZ(regs.a); + STATUS_UPDATE_NZ(tmp); } void