# Constants
ADD pushes src1+src0.
closure variable.
data segment.
global variable.
immediate.
Source addressing.
local variable.
stack.
temp register.
ADDTMP adds src0 to the temp register.
AND pushes src1&src0.
ANDTMP calculates temp & src0 in the temp register.
ARR pushes the src0 + [src1].
ATON converts src0 to a number and pushes it.
CALL calls src0 with argument cnt src1.
CCONT jumps relative to ip + src0 in current context, and switches to a new context that continues from old ip.
DCONT switches context to parent, then deletes contexts between src0 and src1.
DIV pushes src1/src0.
DITMP divides src0 by the temp register.
EQ pushes src1==src0.
EQTMP calculates temp == src0 in the temp register.
EXIT terminates the program.
FLIP pushes ~src0.
FLIPTMP calculates ~temp in the temp register.
FUNC pushes a function value sourced from src0 while setting the closure frame in it to current top.
GE pushes src1>=src0.
GETMP calculates temp >= src0 in the temp register.
GT pushes src1>src0.
GTTMP calculates temp > src0 in the temp register.
INC increments src0.
IX1 pushes src1[src0].
IX2 pushes src2[src1:src0].
JMP jumps relative to ip + src0.
JMPF jumps relative to ip+src1 if src0 is false.
JMPT jumps relative to ip+src1 if src0 is true.
LE pushes src1<=src0.
LEN pushes the length of src0.
LEN pushes the length of src0.
LETMP calculates temp <= src0 in the temp register.
LSH pushes src1<<src0.
LSHTMP calculates temp << src0 in the temp register.
LT pushes src1<src0.
LTTMP calculates temp < src0 in the temp register.
MOD pushes src1%src0.
MODTMP calculates temp % src0 in the temp register.
MOV dst, src0.
MUL pushes src1*src0.
MULTMP multiplies src0 by the temp register.
NE pushes src1!=src0.
NETMP calculates temp!= src0 in the temp register.
Instruction set.
NOT pushes !src0 (or type error if not bool).
NOTTMP calculates !temp in the temp register.
Instruction layout.
Instruction layout.
OR pushes src1|src0.
ORTMP calculates temp | src0 in the temp register.
POP pops stack, result goes nowhere.
PUSH pushes src0.
PUSHTMP pushes the temp register.
DCONT deletes contexts between src0 and src1.
READ builtin.
RET returns from a function call pushing src0 after rolling back the stack.
RSH pushes src1>>src0.
RHSTMP calculates temp >> src0 in the temp register.
SCONT switches context to src0.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
Instruction layout.
No description provided by the author
No description provided by the author
SUB pushes src1-src0.
SUBTMP subtracts src0 from the temp register.
No description provided by the author
TOA converts src0 to a string and pushes it.
WRITE builtin.
YIELD pushes src0 in the current context, swaps the current context with its parent, and pushes src0 in the new context.