de.cau.cs.kieler.krep.evalbench.program
Class Instruction
java.lang.Object
de.cau.cs.kieler.krep.evalbench.program.Instruction
- Direct Known Subclasses:
- Instruction
public abstract class Instruction
- extends Object
Superclass for all assembler instructions. This includes same basic code for displaying an
instruction and to convert it into object code.
- Rating

- (2010-02-05) review by cmot, msp
Instruction
public Instruction()
getLabel
public String getLabel()
- Returns:
- unique label for this instruction
setLabels
public void setLabels(LinkedList<String> labs)
- Parameters:
labs
- list of labels for this instruction
getLabels
public LinkedList<String> getLabels()
- Returns:
- all labels for this instruction
toString
public abstract String toString()
- Overrides:
toString
in class Object
writeObj
public String writeObj()
- give object code for this instruction.
- Returns:
- 4 Bytes for this instruction
getObj
protected abstract int[] getObj()
- Returns:
- object code for the instruction.
setLabel
public void setLabel(String label)
- Parameters:
label
- set unique label for this instruction
asmLabel
public abstract void asmLabel(HashMap<String,Integer> label2addr)
throws ParseException
- replace label by addresses.
- Parameters:
label2addr
- mapping from label to absolute addresses in the instruction ROM
- Throws:
ParseException
- exception thrown for undefined labels