mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
DEC/INC don't adjust carry flags
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
0c07d39250
commit
9d71c78338
@ -837,7 +837,11 @@ uint8_t EightBit::mc6809::da(uint8_t operand) {
|
||||
}
|
||||
|
||||
uint8_t EightBit::mc6809::dec(const uint8_t operand) {
|
||||
return sub(operand, 1);
|
||||
const register16_t subtraction = operand - 1;
|
||||
const auto result = subtraction.low;
|
||||
adjustNZ(result);
|
||||
adjustOverflow(operand, 1, subtraction);
|
||||
return result;
|
||||
}
|
||||
|
||||
uint8_t EightBit::mc6809::eor(uint8_t operand, const uint8_t data) {
|
||||
@ -895,7 +899,12 @@ void EightBit::mc6809::exg(const uint8_t data) {
|
||||
}
|
||||
|
||||
uint8_t EightBit::mc6809::inc(uint8_t operand) {
|
||||
return add(operand, 1);
|
||||
const register16_t addition = operand + 1;
|
||||
const auto result = addition.low;
|
||||
adjustNZ(result);
|
||||
adjustOverflow(operand, 1, addition);
|
||||
adjustHalfCarry(operand, 1, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void EightBit::mc6809::jsr(const register16_t address) {
|
||||
|
Loading…
Reference in New Issue
Block a user