Slightly simplify half-carry evaluation.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-10-14 23:18:13 +01:00
parent 140e87485c
commit 4e48f4a5a0

View File

@ -222,7 +222,7 @@ namespace EightBit {
}
void adjustHalfCarry(uint8_t before, uint8_t data, uint8_t after) {
setFlag(CC(), HF, !!((before ^ data ^ after) & Bit4));
setFlag(CC(), HF, (before ^ data ^ after) & Bit4);
}
void adjustAddition(uint8_t before, uint8_t data, register16_t after) {