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

@@ -36,6 +36,8 @@ public class Sublw extends LiteralCommandUtils implements Command
@Override
public void execute()
{
ProgramCounter.incPC();
Cycles.incCycles();
int result = literal - Memory.workingRegister + 256;
checkZeroBit(result);
@@ -43,7 +45,5 @@ public class Sublw extends LiteralCommandUtils implements Command
checkDigitCarryBit(literal);
Memory.workingRegister = result % 256;
ProgramCounter.incPC();
Cycles.addToCycles(1);
}
}