Initialize Component Management

This commit is contained in:
2025-03-25 18:44:16 +01:00
parent 52daa062df
commit 133ee646d1
28 changed files with 167 additions and 69 deletions

View File

@ -1,28 +1,14 @@
package fabrik.simulator.pic16f84;
import fabrik.simulator.pic16f84.interfaces.*;
public class Commands implements CommandInterface {
public class Commands extends PICComponent implements CommandInterface {
private int wRegister;
private long totalExecutionTime;
private final TimerInterface timer;
private final EEPROMInterface eeprom;
private final WatchdogTimerInterface watchdogTimer;
private final ProgramStackInterface programStack;
private final DataRegisterInterface dataRegister;
private final FrontendControllerInterface frontendController;
public Commands(TimerInterface timer, EEPROMInterface eeprom, WatchdogTimerInterface watchdogTimer,
ProgramStackInterface programStack, DataRegisterInterface dataRegister, FrontendControllerInterface frontendController) {
public Commands(){
super();
wRegister = 0;
totalExecutionTime = 0;
this.timer = timer;
this.eeprom = eeprom;
this.watchdogTimer = watchdogTimer;
this.programStack = programStack;
this.dataRegister = dataRegister;
this.frontendController = frontendController;
}
public int get_wRegister() {
@ -418,7 +404,6 @@ public class Commands implements CommandInterface {
dataRegister.setRegister(file, result);
}
dataRegister.determineZeroFlag(result);
}
public void INCFSZ(int file, int destination) {
@ -571,4 +556,9 @@ public class Commands implements CommandInterface {
addExecutionTime(1);
}
}
@Override
public void initialize(PICComponents picComponents) {
}
}