Skip to content

OpCodes

duangsuse edited this page Feb 7, 2018 · 11 revisions

MinVM Supported Operations instructions

MinVM is a register-based High Level Language VM

Loading Data

OpCode Name StyleB StyleC Desc
loadObject
loadObjectBx
loadInt
loadIntBx
loadShort
loadShortBx
loadLong
loadLongBx
loadDouble
loadDoubleBx
loadByte
loadByteBx
loadFloat
loadFloatBx
loadTrue
loadTrueBx
loadFalse
loadFalseBx
loadChar
loadCharBx
loadNull
loadNullBx

Array Data Type

OpCode Name StyleB StyleC
arrayNew
arrayForType
arrayRange
arrayGet
arrayPut
arraySize
arrayLen

Java Constructor

OpCode Name StyleB StyleC
newObject
protNewObject

Useful Functions

OpCode Name StyleB StyleC
getStdin
putStdout
putStderr
toString

Control Frame

OpCode Name StyleB StyleC
scope
scopeDel
scopeKeep
scopeEnd
throw
unwind

User-defined External Function Call

OpCode Name StyleB StyleC
trace
userDef
axUserDef

Procdure/Threading API

OpCode Name StyleB StyleC
invoke
cxInvoke
proc
procBx
yield
yieldBx
yieldAsync
yiedlAsyncBx
callback

API Call

OpCode Name StyleB StyleC
call
axCall
rescueCall
axRescueCall
staticCall
axStaticCall
rescueStaticCall
axRescueStaticCall
implement
accessCtrl

Get External Data

OpCode Name StyleB StyleC
get
getMeta
getError
getResult
getClass
getMethod
getField
getStatic

Set External Data

OpCode Name StyleB StyleC
put
putMeta
putField
putStatic

And Delete...

OpCode Name StyleB StyleC
del
delError
delResult

Control Flow

OpCode Name StyleB StyleC
raise
raiseIf
raiseIfNot
jump
jumpIf
jumpIfNot
jumpIfError
goto
gotoIf
gotoIfNot
gotoIfError
return
returnIf
returnNull
returnInt
leave
nop
sleep

Calculating

OpCode Name StyleB StyleC
calcAdd
calcSub
calcMul
calcDiv
calcPwr
calcRem
calcNeg
calcAnd
calcOr
calcNot
calcXor
calcBitAnd
calcBitOr
calcBitNot
calcBitXor
calcShl
calcShr

Misc Operations

OpCode Name StyleB StyleC
opConvert
opWarn
opInc
opIsNll
opIsNonNull
opInstanceOf
opEq
opRefEq
opEqZero
opNotEq
opNotEqZero
opGt
opGtZero
opLt
opLtZero
opGe
opGeZero
opLe
opLeZero

VM Stack

OpCode Name StyleB StyleC
stackPush
stackPushInt
stackPushCtx
stackPopCtx
stackPop
stackDup
stackSize
stackLen
stackLenOp

Dealing with two registers

OpCode Name StyleB StyleC
swapAB
swapAC
putB
getB
putC
getC

Table Data Type

OpCode Name StyleB StyleC
tableNew
tableNewType
tableNewTypeType
tableStrIdxNew
tableStrIdx
tableGet
tableGetCx
tableGetCxToBx
tableGetObj
tablePut
tablePutCx
tableDel
tableHasKey
tableHasKeyCx
tableHasVal
tableFind
tableLen
tableLenCx

And String...

OpCode Name StyleB StyleC
stringNew
stringInclude
stringGet
stringCat
stringPut
stringGsub
stringStartsWith
stringEndsWith
stringLen

And List...

OpCode Name StyleB StyleC
listNew
listNewType
listGet
listPut
listDel
listLen
Clone this wiki locally