Interrupts/Call
This commit is contained in:
@ -47,7 +47,7 @@ public class Commands {
|
||||
switch (instruction & 0x3800){
|
||||
case 0b10000000000000:
|
||||
System.out.println("CALL: " + j);
|
||||
CALL (j, true);
|
||||
CALL (j);
|
||||
addExecutionTime(2);
|
||||
return;
|
||||
case 0b10100000000000:
|
||||
@ -271,13 +271,9 @@ public class Commands {
|
||||
DataRegister.setPC(jump-1);
|
||||
}
|
||||
|
||||
public static void CALL(int jump, boolean normalUse) {
|
||||
public static void CALL(int jump) {
|
||||
ProgramStack.push(DataRegister.getPC()+1);
|
||||
if (normalUse)
|
||||
DataRegister.setPC(jump-1);
|
||||
else
|
||||
DataRegister.setPC(jump);
|
||||
|
||||
DataRegister.setPC(jump-1);
|
||||
addExecutionTime(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user