Instruction Set SummaryIndex

Possible Operands
Operand ID Operand Size Description
LB 1 8-bit literal byte
LS 2 16-bit literal short
IX 1 8-bit relative stack index (1-based from stack top)
AX 2 16-bit absolute stack index (0-based from stack bottom)
N 1 8-bit byte count
ADDR 2 16-bit branch or subroutine address
PORT 2 16-bit memory-mapped IO port address

Stack Manipulation
Mnemonic Operand Description Opcode Flags Affected
pushlb LB push literal byte 0x01 N,Z
pushls LS push literal short 0x02 N,Z
pushmb PORT push byte from PORT to stack top 0x03 N,Z
pushmbx - pop short as PORT, push byte from PORT to stack top 0x04 N,Z
pushms PORT push short from PORT to stack top 0x05 N,Z
pushmsx - pop short as PORT, push short from PORT to stack top 0x06 N,Z
pushsb IX push byte at IX to stack top 0x07 N,Z
pushsbx - pop byte as IX, push byte at IX to stack top 0x08 N,Z
pushss IX push short at IX to stack top 0x09 N,Z
pushssx - pop byte as IX, push short at IX to stack top 0x0A N,Z
pushsba AX push byte at AX to stack top 0x0B N,Z
pushsbax - pop short as AX, push byte at AX to stack top 0x0C N,Z
pushssa AX push short at AX to stack top 0x0D N,Z
pushssax - pop short as AX, push short at AX to stack top 0x0E N,Z
pushn N push N bytes onto stack 0x0F -
pushnx - pop byte as N, push N bytes onto stack 0x10 -
popbm PORT pop byte into PORT 0x13 -
popbmx - pop short as PORT, pop byte into PORT 0x14 -
popsm PORT pop short into PORT 0x15 -
popsmx - pop short as PORT, pop short into PORT 0x16 -
popbs IX pop byte into stack at IX 0x17 -
popbsx - pop byte as IX, pop byte into stack at IX 0x18 -
popss IX pop short into stack at IX 0x19 -
popssx - pop byte as IX, pop short into stack at IX 0x1A -
popbsa AX pop byte into stack at AX 0x1B -
popbsax - pop short as AX, pop byte into stack at AX 0x1C -
popssa AX pop short into stack at AX 0x1D -
popssax - pop short as AX, pop short into stack at AX 0x1E -
popcmd - pop command packet from stack, execute command 0x1F -
popb - pop byte, set flags based on popped value 0x20 N,Z
pops - pop short, set flags based on popped value 0x21 N,Z
popn N pop N bytes off the stack 0x22 -
popnx - pop byte as N, pop N bytes off the stack 0x23 -
convbs - pop byte, convert it to short, push new short 0x11 -
convsb - pop short, convert it to byte, push new byte 0x12 C
fmtbb - pop byte, push binary ASCII string 0x4B -
fmtbd - pop byte, push signed decimal ASCII string 0x4C -
fmtbu - pop byte, push unsigned decimal ASCII string 0x4D -
fmtbh - pop byte, push hexadecimal ASCII string 0x4E -
fmtsb - pop short, push binary ASCII string 0x4F -
fmtsd - pop short, push signed decimal ASCII string 0x50 -
fmtsu - pop short, push unsigned decimal ASCII string 0x51 -
fmtsh - pop short, push hexadecimal ASCII string 0x52 -

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

Arithmetic Operations
Mnemonic Operand Description Opcode Flags Affected
decb IX decrement byte at IX 0x24 C,N,Z
decs IX decrement short at IX 0x25 C,N,Z
incb IX increment byte at IX 0x26 C,N,Z
incs IX 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 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.