@Test(expected = IllegalArgumentException.class) public void shouldNotAccept8BitRegistersAsDestinyRegister() { Instruction instruction = new Load16BitImmPcInto16BitRegister(z80, mmu, ANY_8BIT_DESTINY_REGISTER); instruction.execute(); }
@Override public void execute() { int programCounter = z80.getProgramCounter(); int value = mmu.readWord(programCounter); z80.set16BitRegisterValue(destinyRegister, value); z80.incrementProgramCounterTwice(); z80.setLastInstructionExecutionTime(3); }
Load16BitImmPcInto16BitRegister extends Instruction { @Override public void execute() { int programCounter = z80.getProgramCounter(); int value = mmu.readWord(programCounter); z80.set16BitRegisterValue(destinyRegister, value); z80.incrementProgramCounterTwice(); z80.setLastInstructionExecutionTime(3); } }
Load16BitImmPcInto16BitRegister extends Instruction { @Override public void execute() { int programCounter = z80.getProgramCounter(); int value = mmu.readWord(programCounter); z80.set16BitRegisterValue(destinyRegister, value); z80.incrementProgramCounterTwice(); z80.setLastInstructionExecutionTime(3); } Load16BitImmPcInto16BitRegister(GBZ80 z80, MMU mmu, Register destinyRegister); }
Load16BitImmPcInto16BitRegister extends Instruction { @Override public void execute() { int programCounter = z80.getProgramCounter(); int value = mmu.readWord(programCounter); z80.set16BitRegisterValue(destinyRegister, value); z80.incrementProgramCounterTwice(); z80.setLastInstructionExecutionTime(3); } Load16BitImmPcInto16BitRegister(GBZ80 z80, MMU mmu, Register destinyRegister); @Override void execute(); }
Load16BitImmPcInto16BitRegister extends Instruction { @Override public void execute() { int programCounter = z80.getProgramCounter(); int value = mmu.readWord(programCounter); z80.set16BitRegisterValue(destinyRegister, value); z80.incrementProgramCounterTwice(); z80.setLastInstructionExecutionTime(3); } Load16BitImmPcInto16BitRegister(GBZ80 z80, MMU mmu, Register destinyRegister); @Override void execute();  }