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,6 +18,8 @@ public class Rlf extends FileRegisterCommandUtils implements Command
@Override
public void execute()
{
ProgramCounter.incPC();
Cycles.incCycles();
int register = Memory.getRegister(address);
int newCarry = register >>7;
int oldCarry = Memory.getCarryBit();
@@ -31,7 +33,5 @@ public class Rlf extends FileRegisterCommandUtils implements Command
}
writeToDestination(destinationBit, address, register);
ProgramCounter.incPC();
Cycles.addToCycles(1);
}
}