-
Notifications
You must be signed in to change notification settings - Fork 0
The mod commands
r - register/input
v - value
m - mark
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
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
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
PUSH r/v/c arg1
- add arg1 number to stack
POPI r arg1
- pop number from 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