Compare commits
3 Commits
interactiv
...
timer0Inte
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc53450507 | ||
|
|
791201c884 | ||
|
|
60b288a762 |
@@ -7,8 +7,6 @@ import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
|
||||
import de.darkress.pic16f84sim.microcontroller.Watchdog;
|
||||
import de.darkress.pic16f84sim.parser.Parser;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
class Main
|
||||
{
|
||||
public static void main(String[] args) {
|
||||
@@ -26,15 +24,7 @@ class Main
|
||||
String[] instructionName = program[ProgramCounter.getPc()].getClass().toString().split("\\.");
|
||||
System.out.println("Command: " + instructionName[instructionName.length -1]);
|
||||
program[ProgramCounter.getPc()].execute();
|
||||
Cli.showDefaultRegisters();
|
||||
askForInput();
|
||||
Cli.showRegisters();
|
||||
}
|
||||
}
|
||||
|
||||
private static void askForInput() {
|
||||
System.out.println("Wanna give some more input?:");
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
String userInput = scanner.nextLine();
|
||||
if(!(userInput.equals(""))) askForInput();
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import de.darkress.pic16f84sim.microcontroller.Timer;
|
||||
|
||||
public class Cli
|
||||
{
|
||||
public static void showDefaultRegisters() {
|
||||
public static void showRegisters() {
|
||||
printf(Memory.workingRegister, "W-Reg", true);
|
||||
printf(Cycles.getCycles(), "Cycles", false);
|
||||
System.out.printf("%n");
|
||||
@@ -28,7 +28,6 @@ public class Cli
|
||||
System.out.printf("%n");
|
||||
printf(Memory.getRegister(0x0B), "IntCon", true);
|
||||
System.out.printf("%n");
|
||||
|
||||
}
|
||||
|
||||
private static void printf(int value, String description, boolean hex) {
|
||||
|
||||
Reference in New Issue
Block a user