mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-19 02:08:25 +00:00
Correct GB: SWAP r operation. The demoted high nibble was being effectively zeroed each time.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
c10dced63e
commit
fb13d9fdce
@ -342,7 +342,7 @@ void EightBit::LR35902::ccf(uint8_t& a, uint8_t& f) {
|
||||
uint8_t EightBit::LR35902::swap(uint8_t& f, uint8_t operand) {
|
||||
auto low = lowNibble(operand);
|
||||
auto high = highNibble(operand);
|
||||
operand = promoteNibble(low) | demoteNibble(high);
|
||||
operand = promoteNibble(low) | high;
|
||||
adjustZero<LR35902>(f, operand);
|
||||
clearFlag(f, NF | HC | CF);
|
||||
return operand;
|
||||
|
Loading…
Reference in New Issue
Block a user