@Test public void shouldLoadTheContentOfTheRegisterAIntoTheAddressPointedByTheRegisterHL() { z80.set8BitRegisterValue(Register.A, ANY_8BIT_REGISTER_VALUE); z80.set16BitRegisterValue(Register.HL, ANY_16BIT_REGISTER_VALUE); Instruction instruction = new Load8BitRegisterAIntoHLAddress(z80, mmu); instruction.execute(); verify(mmu).writeByte(ANY_16BIT_REGISTER_VALUE, ANY_8BIT_REGISTER_VALUE); }
@Override public void execute() { byte registerValue = z80.get8BitRegisterValue(Register.A); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); z80.setLastInstructionExecutionTime(2); }
Load8BitRegisterAIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(Register.A); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); z80.setLastInstructionExecutionTime(2); } }
Load8BitRegisterAIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(Register.A); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAIntoHLAddress(GBZ80 z80, MMU mmu); }
Load8BitRegisterAIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(Register.A); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAIntoHLAddress(GBZ80 z80, MMU mmu); @Override void execute(); }
Load8BitRegisterAIntoHLAddress extends Instruction { @Override public void execute() { byte registerValue = z80.get8BitRegisterValue(Register.A); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, registerValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAIntoHLAddress(GBZ80 z80, MMU mmu); @Override void execute();  }