|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The InstructionSet interface provides a means to describe a particular architecture's instruction set.
Method Summary | |
int |
assemble(Token lastToken,
Instruction instr,
AsmLine line,
int[] params,
int paramCount)
Assemble a single instruction, returning the correct binary representation of the given instruction and parameters that follow it in the listing. |
java.lang.String |
disassemble(Instruction instr,
MachineState machineState)
Return a String representation of the given instruction |
int |
getClassCount()
Return the number of classes used to represent this instruction set |
Instruction |
getInstructionInstance(int index)
Return an instance of the given instruction class object |
Instruction |
getNewInstruction(int opcode,
MachineState machineState)
Return an initialised instruction for the given opcode |
Method Detail |
public int assemble(Token lastToken, Instruction instr, AsmLine line, int[] params, int paramCount) throws EditorException
token
- The last parsed token for this instructioninstr
- The instruction to assembleline
- The current line being assembledparams
- An array that contains all of the parameters for this instructionparamCount
- The number of parameters discovered for this instructionEditorException
- if the instruction cannot be assembled.public java.lang.String disassemble(Instruction instr, MachineState machineState)
public Instruction getNewInstruction(int opcode, MachineState machineState) throws MiSimException
opcode
- The opcode to encodeMiSimException
- If any errors occur during decodepublic int getClassCount()
public Instruction getInstructionInstance(int index)
index
- The index of the instruction class required
|
miSim | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |