Prescaler, Watchdog, (Cycle-) Timer

This commit is contained in:
2024-05-13 20:53:56 +02:00
parent 3722bff281
commit af17397a1c
6 changed files with 117 additions and 91 deletions

View File

@ -201,7 +201,7 @@ public class Commands {
switch (instruction){
case 0b01100100:
System.out.println("CLRWDT");
//TODO
WatchdogTimer.reset();
return;
case 0b1001:
System.out.println("RETFIE");
@ -249,6 +249,7 @@ public class Commands {
public static void addExecutionTime(int i) {
totalExecutionTime += i;
Timer.cycles(i);
}
public static long getTotalExecutionTime() {
@ -259,8 +260,7 @@ public class Commands {
public static void MOVWF(int file) {
DataRegister.setRegister(file, wRegister);
}
}
public static void CLRW() {
wRegister = 0;
@ -375,7 +375,6 @@ public class Commands {
DataRegister.setRegister(file, content);
}
DataRegister.determineZeroFlag(content);
addExecutionTime(1);
}
public static void IORWF(int file, int destination) {