implemented return instruction; Fixed Bug in Stack.pop() (#4)

Co-authored-by: Darkress <30271678+DarkressX@users.noreply.github.com>
Reviewed-on: darkress/pic16f84-sim#4
This commit was merged in pull request #4.
This commit is contained in:
darkress
2023-05-31 01:30:20 +02:00
parent 666cc2881b
commit eed0b2e3eb
4 changed files with 23 additions and 11 deletions

View File

@@ -12,13 +12,14 @@ class Main
public static void main(String[] args) {
ArrayList<Command> program = new ArrayList<>();
Memory.workingRegister = 0xAA;
int input1 = 0x27FF;
program.add(CommandDecoder.decode(input1));
Memory.setPCLATH(0xFF);
program.get(0).execute();
//ProgramCounter.incPC();
program.add(CommandDecoder.decode(0x3011));
program.add(CommandDecoder.decode(0x2003));
program.add(CommandDecoder.decode(0x3022));
program.add(CommandDecoder.decode(0x0008));
while(true)
{
program.get(ProgramCounter.getPc()).execute();
}
}
}