mirror of
https://github.com/lefticus/6502-cpp.git
synced 2025-01-02 12:30:58 +00:00
fix complement opcode translation
This commit is contained in:
parent
e2b2601705
commit
681e35ba5f
@ -586,11 +586,11 @@ void translate_instruction(const Personality &personality,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case AVR::OpCode::com: {
|
case AVR::OpCode::com: {
|
||||||
// We're doing this in the same way the AVR does it, to make sure the C flag is set properly
|
// We're doing this in the same way the AVR does it, to make sure the C flag is set properly, it expects C to be set
|
||||||
instructions.emplace_back(mos6502::OpCode::clc);
|
|
||||||
instructions.emplace_back(mos6502::OpCode::lda, Operand(Operand::Type::literal, "#$FF"));
|
instructions.emplace_back(mos6502::OpCode::lda, Operand(Operand::Type::literal, "#$FF"));
|
||||||
instructions.emplace_back(mos6502::OpCode::sbc, personality.get_register(o1_reg_num));
|
instructions.emplace_back(mos6502::OpCode::eor, personality.get_register(o1_reg_num));
|
||||||
instructions.emplace_back(mos6502::OpCode::sta, personality.get_register(o1_reg_num));
|
instructions.emplace_back(mos6502::OpCode::sta, personality.get_register(o1_reg_num));
|
||||||
|
instructions.emplace_back(mos6502::OpCode::sec);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case AVR::OpCode::clr: {
|
case AVR::OpCode::clr: {
|
||||||
|
Loading…
Reference in New Issue
Block a user