mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 18:26:42 +00:00
Merge pull request #48 from cooprocks123e/bugfix
Modified "RET imm" to add imm + 1 to the SP instead of imm
This commit is contained in:
commit
f4fd3866eb
@ -33,7 +33,7 @@ public class RetInstruction extends Instruction {
|
||||
@Override
|
||||
public Status execute(int src, Status status) {
|
||||
cpu.setIp((char) cpu.getMemory().get(cpu.getRegisterSet().get(7))); //Jmp
|
||||
cpu.getRegisterSet().set(7, cpu.getRegisterSet().get(7) + src); //Inc SP
|
||||
cpu.getRegisterSet().set(7, cpu.getRegisterSet().get(7) + src + 1); //Inc SP
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user