Class SVM_Instruction
java.lang.Object
svm.instruction.SVM_Instruction
- Direct Known Subclasses:
SVM_ADD, SVM_AND, SVM_ASSIGN, SVM_CALL, SVM_CALL_SYS, SVM_COMPARE, SVM_CONVERT, SVM_DECO, SVM_DIST, SVM_DIV, SVM_DUP, SVM_ENTER, SVM_EQV, SVM_GETO, SVM_GOTO, SVM_IMP, SVM_INCO, SVM_INITO, SVM_JUMP, SVM_LINE, SVM_LOAD, SVM_LOADA, SVM_LOADC, SVM_MULT, SVM_NEG, SVM_NOT, SVM_OR, SVM_POPK, SVM_PRECALL, SVM_PUSHLEN, SVM_REM, SVM_RESTORE, SVM_RETURN, SVM_SAVE, SVM_SETO, SVM_SHIFT, SVM_STORE, SVM_SUB, SVM_SWITCH, SVM_XOR
SVM-INSTRUCTION
Link to GitHub: Source File.
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-Instructionstatic final intSVM-InstructionintThe opcode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringedOpcode(int opcode) Edit the given 'opcode'voidexecute()Execute this SVM instructionstatic SVM_Instructionread(AttributeInputStream inpt) Reads an SVM instruction from the given input.static SVM_InstructionReads an SVM instruction from the given input.voidwrite(AttributeOutputStream oupt) Write this SVM instruction to the given output.
-
Field Details
-
opcode
public int opcodeThe opcode -
iADD
public static final int iADDSVM-Instruction- See Also:
-
iAND
public static final int iANDSVM-Instruction- See Also:
-
iOR
public static final int iORSVM-Instruction- See Also:
-
iCALL
public static final int iCALLSVM-Instruction- See Also:
-
iCOMPARE
public static final int iCOMPARESVM-Instruction- See Also:
-
iCONVERT
public static final int iCONVERTSVM-Instruction- See Also:
-
iDIV
public static final int iDIVSVM-Instruction- See Also:
-
iJUMP
public static final int iJUMPSVM-Instruction- See Also:
-
iJUMPIF
public static final int iJUMPIFSVM-Instruction- See Also:
-
iMULT
public static final int iMULTSVM-Instruction- See Also:
-
iNEG
public static final int iNEGSVM-Instruction- See Also:
-
iLOAD
public static final int iLOADSVM-Instruction- See Also:
-
iPUSHC
public static final int iPUSHCSVM-Instruction- See Also:
-
iRETURN
public static final int iRETURNSVM-Instruction- See Also:
-
iSTORE
public static final int iSTORESVM-Instruction- See Also:
-
iREM
public static final int iREMSVM-Instruction- See Also:
-
iSUB
public static final int iSUBSVM-Instruction- See Also:
-
iSWITCH
public static final int iSWITCHSVM-Instruction- See Also:
-
iCALLSYS
public static final int iCALLSYSSVM-Instruction- See Also:
-
iLINE
public static final int iLINESVM-Instruction- See Also:
-
iNOOP
public static final int iNOOPSVM-Instruction- See Also:
-
iNOT
public static final int iNOTSVM-Instruction- See Also:
-
iGOTO
public static final int iGOTOSVM-Instruction- See Also:
-
iPUSHR
public static final int iPUSHRSVM-Instruction- See Also:
-
iPRECALL
public static final int iPRECALLSVM-Instruction- See Also:
-
iPOPK
public static final int iPOPKSVM-Instruction- See Also:
-
iENTER
public static final int iENTERSVM-Instruction- See Also:
-
iADDREG
public static final int iADDREGSVM-Instruction- See Also:
-
iXOR
public static final int iXORSVM-Instruction- See Also:
-
iINITO
public static final int iINITOSVM-Instruction- See Also:
-
iGETO
public static final int iGETOSVM-Instruction- See Also:
-
iSETO
public static final int iSETOSVM-Instruction- See Also:
-
iINCO
public static final int iINCOSVM-Instruction- See Also:
-
iDECO
public static final int iDECOSVM-Instruction- See Also:
-
iDIST
public static final int iDISTSVM-Instruction- See Also:
-
iEQV
public static final int iEQVSVM-Instruction- See Also:
-
iIMP
public static final int iIMPSVM-Instruction- See Also:
-
iASSIGN
public static final int iASSIGNSVM-Instruction- See Also:
-
iPUSHLEN
public static final int iPUSHLENSVM-Instruction- See Also:
-
iSAVE
public static final int iSAVESVM-Instruction- See Also:
-
iRESTORE
public static final int iRESTORESVM-Instruction- See Also:
-
iSHIFT
public static final int iSHIFTSVM-Instruction- See Also:
-
iDUP
public static final int iDUPSVM-Instruction- See Also:
-
iLOADA
public static final int iLOADASVM-Instruction- See Also:
-
iMax
public static final int iMaxSVM-Instruction- See Also:
-
-
Constructor Details
-
SVM_Instruction
public SVM_Instruction()Default Constructor
-
-
Method Details
-
execute
public void execute()Execute this SVM instruction -
write
Write this SVM instruction to the given output.- Parameters:
oupt- the output stream- Throws:
IOException- if IOException occur
-
read
Reads an SVM instruction from the given input.- Parameters:
inpt- the input stream- Returns:
- the SVM instruction read
- Throws:
IOException- if IOException occur
-
readObject
Reads an SVM instruction from the given input.- Parameters:
inpt- the input stream- Returns:
- the SVM instruction read
- Throws:
IOException- if IOException occur
-
edOpcode
Edit the given 'opcode'- Parameters:
opcode- the opcode- Returns:
- the edited string
-