mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-14 07:09:04 +00:00
Fixed OF and CF flags being always set to false
This commit is contained in:
@@ -25,9 +25,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().set(1, Util.getLowerWord(result));
|
cpu.getRegisterSet().set(1, Util.getLowerWord(result));
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user