Class ADD_d8PCXn

java.lang.Object
CPU.instructions.ADD2Dn.ADD_d8PCXn
All Implemented Interfaces:
InstructionSet

public class ADD_d8PCXn extends Object implements InstructionSet
The ADD/ADDA instruction where the destination is a data/addr register and the source is d8(PC,Xn).
  • Constructor Details

    • ADD_d8PCXn

      public ADD_d8PCXn()
  • Method Details

    • register

      public final void register(MC68000Cpu cpu2)
      Description copied from interface: InstructionSet
      Registers the InstructionSet with the cpu.
      Specified by:
      register in interface InstructionSet
      Parameters:
      cpu2 - the cpu to use.
    • getDisplacement

      protected int getDisplacement(MC68000Cpu cpu)
      gets the displacement and increments the PC.
      Parameters:
      cpu - the smsqmulator.cpu.MC68000Cpu used
      Returns:
      the displacement
    • disassembleOp

      protected final DisassembledInstruction disassembleOp(int address, int opcode, Size sz, String reg, MC68000Cpu cpu)
      Disassemble the instruction.
      Parameters:
      address - address of op in memory
      opcode - MC68000 opcode of operation
      sz - size (.b, .w, .l)
      reg - type of register (address or data)
      cpu - cpu used
      Returns:
      the DisassembledInstruction