-
Notifications
You must be signed in to change notification settings - Fork 0
The mod commands
r - register/input
v - value
m - mark or counter plus value
b - math operation
c - constant
preffix _ used for optional value
COPY r/v/c arg1 r arg2
- copies from arg1 to arg2
ADDI r/v/c arg1 r/v/c arg2 r arg3
- add arg1 and arg2 then copies it to arg3
SUBI r/v/c arg1 r/v/c arg2 r arg3
- sub arg1 and arg2 then copies it to arg3
MULI r/v/c arg1 r/v/c arg2 r arg3
- mul arg1 by arg2 then copies it to arg3
DIVI r/v/c arg1 r/v/c arg2 r arg3
- divide arg1 by arg2 then copies it to arg3
DVRI r/v/c arg1 r/v/c arg2 r arg3
- division remainder of arg1 and arg2 to arg3
EXPI r/v/c arg1 r/v/c arg2 r arg3
- exponentiation arg1 and arg2 then copies it to arg3
ANDI r/v/c arg1 r/v/c arg2 r arg3
- arg1 byte and arg2 and copies it to arg3
ORII r/v/c arg1 r/v/c arg2 r arg3
- arg1 byte or arg2 and copies it to arg3
NOTI r/v/c arg1 r arg2
- byte not arg1 to arg2
XORI r/v/c arg1 r/v/c arg2 r arg3
- arg1 byte xor arg2 and copies it to arg3
MARK m arg1 _v arg2
- saves mark arg1 to marks
. if arg2 defined then mark adress set to arg2
JUMP m arg1
- jump to mark arg1 in marks
CALL m arg1
- jump to mark arg1 in marks
+ save counter value, what can be restored using RETI
RETI
- restore counter value
TEST r/v/c arg1 b arg2 r/v/c arg3 m arg4
- if arg1 arg2(=, !=, >, >=, <, <=) arg3 then jump to mark arg4
CONS c arg1 v arg2
- saves constant to constants
NOPE
- does nothing
WAIT
- waits for user input
SLEP r/v arg1
- sleep arg1 time in seconds
SKIP r/v arg1
- skips arg1 ticks
COMM
- comment, does nothing
PRNT r/v/c arg1
- prints number to log
PUSH r/v/c arg1 r/v/c arg2
- insert arg2 number to stack at index arg1
POPI r/v/c arg1 r arg2
- pop number from stack with index arg1 to arg2
STLN r arg1
- return length of stack to arg1
GETI r/v/c arg1 r arg2
- get number from stack and store it to arg2
SLEN r/v/c arg1 r arg2
- return length of arg1 to arg2
Example: SLEN 200 OUT
return 3 to out
Example: SLEN 223210 OUT
return 6 to out
CUTS r/v/c arg1 r/v/c arg2 r arg3
- cut number arg1 by arg2 from start to arg3
Example: CUTS 120 2 OUT
return 20 to out
Example: CUTS 123456 4 OUT
return 3456 to out
CUTE r/v/c arg1 r/v/c arg2 r arg3
- cut number arg1 by arg2 from end to arg3
Example: CUTE 120 2 OUT
return 12 to out
Example: CUTE 123456 4 OUT
return 1234 to out
ADDS r/v/c arg1 r/v/c arg2 r arg3
- combine numbers arg1 and arg2 to arg3
Example: ADDS 2323 45 OUT
return 232345 to out
Example: ADDS 231 232 OUT
return 231232 to out
SRVS r/v/c arg1 r arg2
- reverse number arg1 to arg2
Example: SRVS 00001 OUT
return 10000 to out
Example: SRVS 12345 OUT
return 54321 to out
RAND r/v/c arg1 r arg2
- get random number from 1 to arg1 and store it to arg2
Example: RAND 200 OUT
return 1-200 to out
Example: RAND 13 OUT
return 1-13 to out
ABSI c/r/v arg1 r arg2
- return math.abs(arg1) to arg2
ACOS c/r/v arg1 r arg2
- return math.acos(arg1) to arg2
ASIN c/r/v arg1 r arg2
- return math.asin(arg1) to arg2
ATAN c/r/v arg1 r arg2
- return math.atan(arg1) to arg2
ATN2 c/r/v arg1 c/r/v arg2 r arg3
- return math.atan2(arg1, arg2) to arg3
CEIL c/r/v arg1 r arg2
- return math.ceil(arg1) to arg2
COSI c/r/v arg1 r arg2
- return math.cos(arg1) to arg2
COSH c/r/v arg1 r arg2
- return math.cosh(arg1) to arg2
DEGI c/r/v arg1 r arg2
- return math.deg(arg1) to arg2
EXPO c/r/v arg1 r arg2
- return math.exp(arg1) to arg2
FLOR c/r/v arg1 r arg2
- return math.floor(arg1) to arg2
FMOD c/r/v arg1 c/r/v arg2 r arg3
- return math.fmod(arg1, arg2) to arg3
FRXP c/r/v arg1 r arg2
- return math.frexp(arg1) to arg2
HUGE r arg1
- return math.huge to arg1
LDXP c/r/v arg1 c/r/v arg2 r arg3
- return math.ldexp(arg1, arg2) to arg3
LOGI c/r/v arg1 r arg2
- return math.log(arg1) to arg2
LG10 c/r/v arg1 r arg2
- return math.log10(arg1) to arg2
MAXI c/r/v arg1 c/r/v arg2 r arg3
- return math.max(arg1, arg2) to arg3
MINI c/r/v arg1 c/r/v arg2 r arg3
- return math.min(arg1, arg2) to arg3
MODF c/r/v arg1 r arg2
- return math.modf(arg1) to arg2
PIII r arg1
- return math.pi to arg1
POWI c/r/v arg1 c/r/v arg2 r arg3
- return math.pow(arg1, arg2) to arg3
RADI c/r/v arg1 r arg2
- return math.rad(arg1) to arg2
SINI c/r/v arg1 r arg2
- return math.sin(arg1) to arg2
SINH c/r/v arg1 r arg2
- return math.sinh(arg1) to arg2
SQRT c/r/v arg1 r arg2
- return math.sqrt(arg1) to arg2
TANI c/r/v arg1 r arg2
- return math.tan(arg1) to arg2
TANH c/r/v arg1 r arg2
- return math.tanh(arg1) to arg2
ROND c/r/v arg1 r arg2
- return math.round(arg1) to arg2