Package net.emustudio.emulib.plugins.cpu
Class DisassembledInstruction
- java.lang.Object
-
- net.emustudio.emulib.plugins.cpu.DisassembledInstruction
-
public class DisassembledInstruction extends java.lang.ObjectThis 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 intgetAddress()Returns the address of the instruction.java.lang.StringgetMnemo()Returns mnemonic representation of the instruction.java.lang.StringgetOpCode()Returns operating code of the instruction.voidsetAddress(int address)Set the address of the instruction to a new value.voidsetInstruction(java.lang.String mnemo, java.lang.String opcode)Assigns new/modified instruction.java.lang.StringtoString()
-
-
-
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 memorymnemo- 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 instructionopcode- 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:
toStringin classjava.lang.Object
-
-