mirror of
https://github.com/FranLMSP/rmg-001.git
synced 2024-11-27 03:31:31 +00:00
Bug on RET instruction
This commit is contained in:
parent
aded5fe534
commit
581e1c19d6
11
src/cpu.rs
11
src/cpu.rs
@ -724,10 +724,13 @@ impl CPU {
|
|||||||
self.registers.increment(Register::SP, 2);
|
self.registers.increment(Register::SP, 2);
|
||||||
},
|
},
|
||||||
// RET, same as POP PC when no parameter is specified
|
// RET, same as POP PC when no parameter is specified
|
||||||
Opcode::RET(params) => match params {
|
Opcode::RET(params) => {
|
||||||
OpcodeParameter::NoParam => self.exec(Opcode::POP(Register::PC), bus),
|
self.registers.increment(Register::PC, 1);
|
||||||
_ => {},
|
match params {
|
||||||
}
|
OpcodeParameter::NoParam => self.exec(Opcode::POP(Register::PC), bus),
|
||||||
|
_ => {},
|
||||||
|
};
|
||||||
|
},
|
||||||
// Rotate A Left
|
// Rotate A Left
|
||||||
Opcode::RLCA => {
|
Opcode::RLCA => {
|
||||||
self.registers.increment(Register::PC, 1);
|
self.registers.increment(Register::PC, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user