@Test public void shouldUseTwoCyclesAsLastExecutionTime() { Instruction instruction = new Load8BitImmPCIntoHLAddress(z80, mmu); instruction.execute(); assertEquals(3, z80.getLastInstructionExecutionTime()); }
@Override public void execute() { byte value = mmu.readByte(z80.getProgramCounter()); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, value); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); }
Load8BitImmPCIntoHLAddress extends Instruction { @Override public void execute() { byte value = mmu.readByte(z80.getProgramCounter()); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, value); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } }
Load8BitImmPCIntoHLAddress extends Instruction { @Override public void execute() { byte value = mmu.readByte(z80.getProgramCounter()); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, value); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitImmPCIntoHLAddress(GBZ80 z80, MMU mmu); }
Load8BitImmPCIntoHLAddress extends Instruction { @Override public void execute() { byte value = mmu.readByte(z80.getProgramCounter()); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, value); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitImmPCIntoHLAddress(GBZ80 z80, MMU mmu); @Override void execute(); }
Load8BitImmPCIntoHLAddress extends Instruction { @Override public void execute() { byte value = mmu.readByte(z80.getProgramCounter()); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, value); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitImmPCIntoHLAddress(GBZ80 z80, MMU mmu); @Override void execute();  }