Class DisassembledInstruction


  • public class DisassembledInstruction
    extends java.lang.Object
    This class represents disassembled instruction. It is used by disassembler.

    It is implemented as read/write container that stores address, mnemo and opcode of the instruction.

    • Constructor Summary

      Constructors 
      Constructor Description
      DisassembledInstruction​(int address, java.lang.String mnemo, java.lang.String opCode)
      Creates a new instance of DisassembledInstruction
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAddress()
      Returns the address of the instruction.
      java.lang.String getMnemo()
      Returns mnemonic representation of the instruction.
      java.lang.String getOpCode()
      Returns operating code of the instruction.
      void setAddress​(int address)
      Set the address of the instruction to a new value.
      void setInstruction​(java.lang.String mnemo, java.lang.String opcode)
      Assigns new/modified instruction.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DisassembledInstruction

        public DisassembledInstruction​(int address,
                                       java.lang.String mnemo,
                                       java.lang.String opCode)
        Creates a new instance of DisassembledInstruction
        Parameters:
        address - The address of the instruction in memory
        mnemo - The mnemonic form of the instruction (textual representation)
        opCode - Operating code in textual representation
    • Method Detail

      • getMnemo

        public java.lang.String getMnemo()
        Returns mnemonic representation of the instruction.
        Returns:
        a string representing mnemonics form of the instruction
      • getOpCode

        public java.lang.String getOpCode()
        Returns operating code of the instruction.
        Returns:
        a string that represents the operating code of the instruction
      • setInstruction

        public void setInstruction​(java.lang.String mnemo,
                                   java.lang.String opcode)
        Assigns new/modified instruction.
        Parameters:
        mnemo - new mnemonics representation of the instruction
        opcode - new operating code
      • getAddress

        public int getAddress()
        Returns the address of the instruction.
        Returns:
        address of the instruction
      • setAddress

        public void setAddress​(int address)
        Set the address of the instruction to a new value.
        Parameters:
        address - new address of the instruction
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object