@Test(expected = IllegalArgumentException.class) public void shouldNotAccept16BitRegistersAsSourceRegister() { Instruction instruction = new Load8BitRegisterAddressIntoHLAddress(z80, mmu, ANY_16BIT_SOURCE_REGISTER); instruction.execute(); }
@Override public void execute() { int registerValue = z80.get8BitRegisterValue(sourceRegister); byte memoryValue = mmu.readByte(registerValue); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, memoryValue); z80.setLastInstructionExecutionTime(2); }
Load8BitRegisterAddressIntoHLAddress extends Instruction { @Override public void execute() { int registerValue = z80.get8BitRegisterValue(sourceRegister); byte memoryValue = mmu.readByte(registerValue); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, memoryValue); z80.setLastInstructionExecutionTime(2); } }
Load8BitRegisterAddressIntoHLAddress extends Instruction { @Override public void execute() { int registerValue = z80.get8BitRegisterValue(sourceRegister); byte memoryValue = mmu.readByte(registerValue); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAddressIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); }
Load8BitRegisterAddressIntoHLAddress extends Instruction { @Override public void execute() { int registerValue = z80.get8BitRegisterValue(sourceRegister); byte memoryValue = mmu.readByte(registerValue); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAddressIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); @Override void execute(); }
Load8BitRegisterAddressIntoHLAddress extends Instruction { @Override public void execute() { int registerValue = z80.get8BitRegisterValue(sourceRegister); byte memoryValue = mmu.readByte(registerValue); int address = z80.get16BitRegisterValue(Register.HL); mmu.writeByte(address, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitRegisterAddressIntoHLAddress(GBZ80 z80, MMU mmu, Register sourceRegister); @Override void execute();  }