Refactored incCycle command

This commit is contained in:
Darkress
2023-06-16 20:04:50 +02:00
parent bf182815d2
commit 324912080d
32 changed files with 71 additions and 70 deletions

View File

@@ -18,15 +18,14 @@ public class Btfss extends BitOrientedCommandUtils implements Command
@Override
public void execute()
{
ProgramCounter.incPC();
Cycles.incCycles();
int result = Memory.getRegister(address);
if((result & (1 << bitPlacement)) > 0) //Test if bit is set
{
ProgramCounter.incPC();
Cycles.addToCycles(1);
Nop nop = new Nop();
nop.execute();
}
ProgramCounter.incPC();
Cycles.addToCycles(1);
}
}