diff --git a/de/darkress/pic16f84sim/commands/Andlw.java b/de/darkress/pic16f84sim/commands/Andlw.java index b5d1547..d907155 100644 --- a/de/darkress/pic16f84sim/commands/Andlw.java +++ b/de/darkress/pic16f84sim/commands/Andlw.java @@ -1,6 +1,7 @@ package de.darkress.pic16f84sim.commands; import de.darkress.pic16f84sim.microcontroller.Memory; +import de.darkress.pic16f84sim.microcontroller.ProgramCounter; public class Andlw extends LiteralCommandUtils implements Command { @@ -18,5 +19,6 @@ public class Andlw extends LiteralCommandUtils implements Command checkZeroBit(result); Memory.workingRegister = result % 256; + ProgramCounter.incPC(); } } diff --git a/de/darkress/pic16f84sim/commands/Decfsz.java b/de/darkress/pic16f84sim/commands/Decfsz.java index 948c5aa..9931eb2 100644 --- a/de/darkress/pic16f84sim/commands/Decfsz.java +++ b/de/darkress/pic16f84sim/commands/Decfsz.java @@ -25,8 +25,7 @@ public class Decfsz extends FileRegisterCommandUtils implements Command if((result % 256) == 0) { - Nop nop = new Nop(); - nop.execute(); // TODO: What happens if an interrupt gets triggered during the nop execution? + ProgramCounter.incPC(); } ProgramCounter.incPC(); } diff --git a/de/darkress/pic16f84sim/commands/Incfsz.java b/de/darkress/pic16f84sim/commands/Incfsz.java index e795c7c..538b42c 100644 --- a/de/darkress/pic16f84sim/commands/Incfsz.java +++ b/de/darkress/pic16f84sim/commands/Incfsz.java @@ -25,8 +25,7 @@ public class Incfsz extends FileRegisterCommandUtils implements Command if((result % 256) == 0) { - Nop nop = new Nop(); - nop.execute(); // TODO: What happens if an interrupt gets triggered during the nop execution? + ProgramCounter.incPC(); } ProgramCounter.incPC(); } diff --git a/de/darkress/pic16f84sim/commands/Iorlw.java b/de/darkress/pic16f84sim/commands/Iorlw.java index d564e87..207c6f5 100644 --- a/de/darkress/pic16f84sim/commands/Iorlw.java +++ b/de/darkress/pic16f84sim/commands/Iorlw.java @@ -1,6 +1,7 @@ package de.darkress.pic16f84sim.commands; import de.darkress.pic16f84sim.microcontroller.Memory; +import de.darkress.pic16f84sim.microcontroller.ProgramCounter; public class Iorlw extends LiteralCommandUtils implements Command { @@ -18,5 +19,6 @@ public class Iorlw extends LiteralCommandUtils implements Command checkZeroBit(result); Memory.workingRegister = result % 256; + ProgramCounter.incPC(); } } diff --git a/de/darkress/pic16f84sim/commands/Sublw.java b/de/darkress/pic16f84sim/commands/Sublw.java index ed28bbd..df5c37d 100644 --- a/de/darkress/pic16f84sim/commands/Sublw.java +++ b/de/darkress/pic16f84sim/commands/Sublw.java @@ -1,6 +1,7 @@ package de.darkress.pic16f84sim.commands; import de.darkress.pic16f84sim.microcontroller.Memory; +import de.darkress.pic16f84sim.microcontroller.ProgramCounter; public class Sublw extends LiteralCommandUtils implements Command { @@ -41,5 +42,6 @@ public class Sublw extends LiteralCommandUtils implements Command checkDigitCarryBit(literal); Memory.workingRegister = result % 256; + ProgramCounter.incPC(); } } diff --git a/de/darkress/pic16f84sim/commands/Xorlw.java b/de/darkress/pic16f84sim/commands/Xorlw.java index e93d615..836b32c 100644 --- a/de/darkress/pic16f84sim/commands/Xorlw.java +++ b/de/darkress/pic16f84sim/commands/Xorlw.java @@ -1,6 +1,7 @@ package de.darkress.pic16f84sim.commands; import de.darkress.pic16f84sim.microcontroller.Memory; +import de.darkress.pic16f84sim.microcontroller.ProgramCounter; public class Xorlw extends LiteralCommandUtils implements Command { @@ -18,5 +19,6 @@ public class Xorlw extends LiteralCommandUtils implements Command checkZeroBit(result); Memory.workingRegister = result % 256; + ProgramCounter.incPC(); } }