mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 02:56:44 +00:00
Fixed OF and CF flags being always set to false in the other function
This commit is contained in:
parent
a9e580f2ce
commit
5afa767b4a
@ -46,9 +46,11 @@ public class MulInstruction extends Instruction {
|
|||||||
status.setOverflowFlag(true);
|
status.setOverflowFlag(true);
|
||||||
status.setCarryFlag(true);
|
status.setCarryFlag(true);
|
||||||
cpu.getRegisterSet().getRegister("Y").setValue(hWord);//Don't overwrite Y register if it's blank
|
cpu.getRegisterSet().getRegister("Y").setValue(hWord);//Don't overwrite Y register if it's blank
|
||||||
}
|
} else {
|
||||||
status.setOverflowFlag(false);
|
status.setOverflowFlag(false);
|
||||||
status.setCarryFlag(false);
|
status.setCarryFlag(false);
|
||||||
|
}
|
||||||
|
|
||||||
cpu.getRegisterSet().getRegister("A").setValue(Util.getLowerWord(result));
|
cpu.getRegisterSet().getRegister("A").setValue(Util.getLowerWord(result));
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user