Fixed OF and CF flags being always set to false in the other function

This commit is contained in:
simon 2017-12-29 17:09:30 -05:00
parent a9e580f2ce
commit 5afa767b4a

View File

@ -46,9 +46,11 @@ public class MulInstruction extends Instruction {
status.setOverflowFlag(true);
status.setCarryFlag(true);
cpu.getRegisterSet().getRegister("Y").setValue(hWord);//Don't overwrite Y register if it's blank
} else {
status.setOverflowFlag(false);
status.setCarryFlag(false);
}
status.setOverflowFlag(false);
status.setCarryFlag(false);
cpu.getRegisterSet().getRegister("A").setValue(Util.getLowerWord(result));
return status;