Compare commits

..

1 Commits

Author SHA1 Message Date
Darkress
5f1ba4e9e6 implemented btfss Instruction 2023-06-07 21:34:01 +02:00
6 changed files with 4 additions and 10 deletions

View File

@@ -1,7 +1,6 @@
package de.darkress.pic16f84sim.commands;
import de.darkress.pic16f84sim.microcontroller.Memory;
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
public class Andlw extends LiteralCommandUtils implements Command
{
@@ -19,6 +18,5 @@ public class Andlw extends LiteralCommandUtils implements Command
checkZeroBit(result);
Memory.workingRegister = result % 256;
ProgramCounter.incPC();
}
}

View File

@@ -25,7 +25,8 @@ public class Decfsz extends FileRegisterCommandUtils implements Command
if((result % 256) == 0)
{
ProgramCounter.incPC();
Nop nop = new Nop();
nop.execute(); // TODO: What happens if an interrupt gets triggered during the nop execution?
}
ProgramCounter.incPC();
}

View File

@@ -25,7 +25,8 @@ public class Incfsz extends FileRegisterCommandUtils implements Command
if((result % 256) == 0)
{
ProgramCounter.incPC();
Nop nop = new Nop();
nop.execute(); // TODO: What happens if an interrupt gets triggered during the nop execution?
}
ProgramCounter.incPC();
}

View File

@@ -1,7 +1,6 @@
package de.darkress.pic16f84sim.commands;
import de.darkress.pic16f84sim.microcontroller.Memory;
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
public class Iorlw extends LiteralCommandUtils implements Command
{
@@ -19,6 +18,5 @@ public class Iorlw extends LiteralCommandUtils implements Command
checkZeroBit(result);
Memory.workingRegister = result % 256;
ProgramCounter.incPC();
}
}

View File

@@ -1,7 +1,6 @@
package de.darkress.pic16f84sim.commands;
import de.darkress.pic16f84sim.microcontroller.Memory;
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
public class Sublw extends LiteralCommandUtils implements Command
{
@@ -42,6 +41,5 @@ public class Sublw extends LiteralCommandUtils implements Command
checkDigitCarryBit(literal);
Memory.workingRegister = result % 256;
ProgramCounter.incPC();
}
}

View File

@@ -1,7 +1,6 @@
package de.darkress.pic16f84sim.commands;
import de.darkress.pic16f84sim.microcontroller.Memory;
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
public class Xorlw extends LiteralCommandUtils implements Command
{
@@ -19,6 +18,5 @@ public class Xorlw extends LiteralCommandUtils implements Command
checkZeroBit(result);
Memory.workingRegister = result % 256;
ProgramCounter.incPC();
}
}