Command | Description | Definition |
ADD x | Add x to accumulator | A+=x; F=A |
AND x | And x with accumulator | A&=x; F=A |
CALL L | Call subroutine at tag L | push(PC+1); PC=L |
CMP x | Compare x with accumulator | F=A-x |
DCR y | Decrement register | --*y; F=*y |
DCRA | Decrement accumulator | --A; F=A |
DIV x | Divide x into accumulator | A/=x; F=A |
HALT | Halt | Halt |
INR y | Increment register | ++*y; F=*y |
INRA | Increment accumulator | ++A; F=A |
JGE L | Jump if >= 0 to tag L | if (F>=0) PC=L |
JGT L | Jump if > 0 to tag L | if (F>0) PC=L |
JLE L | Jump if <= 0 to tag L | if (F<=0) PC=L |
JLT L | Jump if < 0 to tag L | if (F<0) PC=L |
JMP L | Jump to tag L | PC=L |
JNZ L | Jump if non-zero to tag L | if (F) PC=L |
JZ L | Jump if zero to tag L | if (!F) PC=L |
LD y x | Load register with x | *y=x |
LDA x | Load accumulator with x | A=x |
MLT x | Multiply x with accumulator | A*=x; F=A |
MOD x | Modulus x with accumulator | A%=x; F=A |
OR x | Or x with accumulator | A|=x; F=A |
POP y | Pop register | y=pop() |
POPA | Pop accumulator | A=pop() |
PUSH y | Push register | push(y) |
PUSHA | Push accumulator | push(A) |
RET | Return from subroutine | PC=pop() |
RL y x | Rotate left register x bits | *y<<=x; F=*y |
RLA x | Rotate left accumulator x bits | A<<=x; F=A |
RR y x | Rotate right register x bits | *y>>=x; F=*y |
RRA x | Rotate right accumulator x bits | A>>=x; F=A |
SHL y x | Shift left register x bits | *y<<=x; F=*y |
SHLA x | Shift left accumulator x bits | A<<=x; F=A |
SHR y x | Shift right register x bits | *y>>=x; F=*y |
SHRA x | Shift right accumulator x bits | A>>=x; F=A |
STA y | Store accumulator in register | y=A |
SUB x | Subtract x from accumulator | A-=x; F=A |
SYS str | Run external script | system(str); F=A |
TAG L | Label the current position | N/A |
X y1 y2 | Exchange registers y1 and y2 | t=*y1;*y1=*y2;*y2=t |
XA y | Exchange accumulator and register | t=A;A=*y;*y=t |
XOR x | Xor x with accumulator | A^=x; F=A |