@Test public void shouldUseTwoCyclesAsLastInstructionExecutionTime() { Instruction instruction = new Load8BitRegisterIntoHLAddress(z80, mmu, ANY_8BIT_SOURCE_REGISTER); instruction.execute(); assertEquals(2, z80.getLastInstructionExecutionTime()); }
@Override public void execute() { byte registerValue = z80.get8BitRegisterValue(sourceRegister); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); setLastExecutionTime(2); }
Load8BitRegisterIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(sourceRegister); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); setLastExecutionTime(2); } }
Load8BitRegisterIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(sourceRegister); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); setLastExecutionTime(2); } Load8BitRegisterIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); }
Load8BitRegisterIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(sourceRegister); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); setLastExecutionTime(2); } Load8BitRegisterIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); @Override void execute(); }
Load8BitRegisterIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(sourceRegister); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); setLastExecutionTime(2); } Load8BitRegisterIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); @Override void execute();  }