Basic read-only cli (#35)
Co-authored-by: Darkress <30271678+DarkressX@users.noreply.github.com> Reviewed-on: darkress/pic16f84-sim#35
This commit was merged in pull request #35.
This commit is contained in:
@@ -111,7 +111,7 @@ public class Memory
|
||||
return 1;
|
||||
}
|
||||
|
||||
private static int getFSR()
|
||||
public static int getFSR()
|
||||
{
|
||||
return memory[0x4];
|
||||
}
|
||||
|
||||
@@ -18,10 +18,6 @@ public class Stack
|
||||
return stack[stackPointer];
|
||||
}
|
||||
|
||||
public static int peek()
|
||||
{
|
||||
return stack[(stackPointer + 7) % 8]; //Get TopOfStack -1 +8 = 7 and modulo 8 to avoid IndexOutOfBound
|
||||
}
|
||||
|
||||
private static void pointNext()
|
||||
{
|
||||
|
||||
@@ -29,7 +29,8 @@ public class Watchdog
|
||||
|
||||
public static void resetProgram()
|
||||
{
|
||||
Memory.setRegister(0x03, Memory.getRegister(0x03) | 0x10);
|
||||
Memory.setRegister(0x03, Memory.getRegister(0x03) | 0x10); //Set !T0 in StatusReg
|
||||
ProgramCounter.resetProgramCounter();
|
||||
watchdogTimer = 18000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user