VM Flow and Math InstructionsIndex

Program Flow
Mnemonic Operand (Size) Description Opcode Flags Affected
nop - no operation 0x00 -
brneg ADDR (2) branch to ADDR if N set 0x40 -
brpos ADDR (2) branch to ADDR if Z clear and N clear 0x41 -
brz ADDR (2) branch to ADDR if Z set 0x42 -
brnz ADDR (2) branch to ADDR if Z clear 0x43 -
brc ADDR (2) branch to ADDR if C set 0x44 -
brnc ADDR (2) branch to ADDR if C clear 0x45 -
cmpbbr ADDR (2) branch to ADDR if top two bytes are equal 0x46 -
cmpsbr ADDR (2) branch to ADDR if top two shorts are equal 0x47 -
goto ADDR (2) unconditional branch to ADDR 0x48 -
call ADDR (2) execute subroutine at ADDR 0x49 -
return - return from subroutine 0x4A -
exit - terminate program execution 0x53 -

Arithmetic Operations
Mnemonic Operand (Size) Description Opcode Flags Affected
decb IX (1) decrement byte at IX 0x24 C,N,Z
decs IX (1) decrement short at IX 0x25 C,N,Z
incb IX (1) increment byte at IX 0x26 C,N,Z
incs IX (1) increment short at IX 0x27 C,N,Z
addb - pop byte A, pop byte B, push A+B 0x28 C,N,Z
adds - pop short A, pop short B, push A+B 0x29 C,N,Z
subb - pop byte A, pop byte B, push A-B 0x2A C,N,Z
subs - pop short A, pop short B, push A-B 0x2B C,N,Z
negb - negate top byte 0x2C C,N,Z
negs - negate top short 0x2D C,N,Z
multb - pop byte A, pop byte B, push A*B 0x2E N,Z
mults - pop short A, pop short B, push A*B 0x2F C,N,Z
divb - pop byte A, pop byte B, push A/B 0x30 N,Z
divs - pop short A, pop short B, push A/B 0x31 N,Z
modb - pop byte A, pop byte B, push A mod B 0x32 N,Z
mods - pop short A, pop short B, push A mod B 0x33 N,Z

Logical Operations
Mnemonic Operand (Size) Description Opcode Flags Affected
andb - pop byte A, pop byte B, push A&B 0x34 N,Z
ands - pop short A, pop short B, push A&B 0x35 N,Z
orb - pop byte A, pop byte B, push A|B 0x36 N,Z
ors - pop short A, pop short B, push A|B 0x37 N,Z
xorb - pop byte A, pop byte B, push A^B 0x38 N,Z
xors - pop short A, pop short B, push A^B 0x39 N,Z
compb - complement top byte 0x3A N,Z
comps - complement top short 0x3B N,Z
rlb - pop byte as N, left shift top byte N times 0x3C C,N,Z
rls - pop byte as N, left shift top short N times 0x3D C,N,Z
rrb - pop byte as N, right shift top byte N times 0x3E C,N,Z
rrs - pop byte as N, right shift top short N times 0x3F C,N,Z

version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado.  All rights reserved.