mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
Whoops: missed a couple of flag adjustments.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
838580cc3d
commit
49d7a4c169
@ -307,6 +307,7 @@ void EightBit::LR35902::add(uint8_t& operand, uint8_t value, int carry) {
|
|||||||
|
|
||||||
clearFlag(NF);
|
clearFlag(NF);
|
||||||
setFlag(CF, result.word & Bit8);
|
setFlag(CF, result.word & Bit8);
|
||||||
|
adjustZero(operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EightBit::LR35902::adc(uint8_t& operand, uint8_t value) {
|
void EightBit::LR35902::adc(uint8_t& operand, uint8_t value) {
|
||||||
@ -324,6 +325,7 @@ void EightBit::LR35902::sub(uint8_t& operand, uint8_t value, int carry) {
|
|||||||
|
|
||||||
setFlag(NF);
|
setFlag(NF);
|
||||||
setFlag(CF, result.word & Bit8);
|
setFlag(CF, result.word & Bit8);
|
||||||
|
adjustZero(operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EightBit::LR35902::sbc(uint8_t& operand, uint8_t value) {
|
void EightBit::LR35902::sbc(uint8_t& operand, uint8_t value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user