Work / Virtual Machine

2011-02-19 23:25:23

Instruction Set

There are currently (todo: count the number of instructions) defined instructions defined in the virtual machine. It is thankfully simple to add new instructions due to how it has been designed and the current expectation is that the instruction set will change as more use-cases are tested. It is still the intention for this virtual machine to eventually be used in a 'game engine' as a scripting engine for manipulating scene-graphs.

Instructions currently implemented in the virtual machine are enumerated below by classification. Each mnemonic links to a more detailed description of the related instruction. Vector and Matrix instructions are planned for inclusion at a later date.

Instructions by Classification

Structural
Stack
Addressing / Heap
nop
entr
entf
pshi
pshw
pshb
load
lodw
lodb
leav
call
clla
push
psh2
psh3
stor
stow
stob
farc
ret
reti
pshd
pop
popr
mmov
mmvw
mmvb
retn
lret
lrtn
popn
iesp
desp
addr
syma
padr
lrti


iespi
despi

new
del

Conditional
Conditional (INT)
Conditional (uint)
jmp
jz
jnz
jig
jil
jige
jg
jl
jge
jcmp
jncmp
 
jile
jigz
jlz
jle
jgz
 
CONDITIONAL (FLT)
Floating Point
Context
jfg
jfl
jfge
finc
fdec
fadd
geip
gebp
gesp
 jfle
jfgz
 jflz
fsub
fmul
fdiv
gds
gcs
gss
 jfz
jfnz
jfcmp
fmod
flor
ceil
gsds
gscs
gsss
jfncmp


fabs


gstt
   
Unsigned Integer
Signed Integer
Stack Frame
inc
dec
add
abs
imul
idiv
mov
movd
movf
sub
mul
div
imod


movi
movw
movb
mod





swap
   
Conversion
Misc
Exception
ftoi
itof

break
halt

gexh
sexh
throw
Bitwise
   
and
or
xor
           
not
shl
shr
           
sal
sar
rol
           
ror
rcl
rcr
           

This Page is currently under construction...