Symbols:
 
: Label Is used to make loops. Use jmp or jmp! to jump to those labels.
; Comment Is ignored by interpreter. Used to comment important notes inside code.

Instructions:
 

Instr. Ussage Description
new  new [NAME] [TYPE] Creates new variable with name [NAME]. 
set  set [VARIABLE] '[VALUE]' Sets variable's value to the [VALUE].
out  out  [VARIABLE] Displays value of variable [VARIABLE] without jumping to new line.
out! out! [VARIABLE] Displays value of variable [VARIABLE] and jumps to new line. (Recommended)
cpy  cpy [VAR1] [VAR2] Sets variable [VAR1]'s value to value of variable [VAR2].
add  add [VAR1] [VAR2] Addition. Adds value of variable [VAR2] to variable [VAR1].
sub  sub [VAR1] [VAR2] Subtraction. Subtracts value of variable [VAR2] to variable [VAR1].
flp  flp [VARIABLE] Flips variable [VARIABLE]'s value to its negative representation.
len  len [VAR1] [VAR2] Sets variable [VAR1]'s value to the length of variable [VAR2]'s value length.
tof  tof [VAR1] [VAR2] Returns the type of variable [VAR2]'s value to variable [VAR1].
put  put [VAR1] [VAR2] Merges value of variable [VAR2] with variable [VAR1] to variable [VAR1].
cut  cut [VAR] [START] [END] Slices variable [VAR]'s value by variable [START] to variable [END].
get  get [VAR] [NAME] [VALUE] Gets system variables, such as time or random and puts them in variable [VAR]'s value.
psh  psh [VARIABLE]

Pushes value to a stack. Usefull when dealing with label calls via jmp!.

pop  pop [VARIABLE]

Pops value from a stack. Usefull when dealing with label calls via jmp!.

If you push values in order: 1, 2, 3.
You have to pop them in order: 3, 2, 1.

mul  mul [VAR1] [VAR2]

Multiplication. Multiplies value of variable [VAR2] to variable [VAR1].

div  div [VAR1] [VAR2]

Division. Divides value of variable [VAR2] to variable [VAR1].

mod  mod [VAR1] [VAR2]

Remainder. Returns the amount "left over" after division of variable [VAR2] to variable [VAR1].

clr
clr

Flush the console. Thats it. It clears console output.


Get instruction:

[NAME] [VALUE] Ussage Description
sys_input Key* get d_key sys_input KeyD

Gets input of pressed D key (0 or 1) to variable d_key.

* means that there can be any other letters, or even "Space".

For more check code_values.

sys_env Random get rnd sys_env Random

Gets random integer value in range (0 to 1000) to variable rnd.

sys_env Time get time sys_env Time

Gets time in seconds since epoch as integer to variable time.

sys_env TimeMs get time sys_env TimeMs

Gets time in milliseconds since epoch as integer to variable time.

 

Branches:


Branch Ussage Description
siz  siz [VARIABLE] Skips next instruction if variable [VARIABLE]'s value is zero.
siz! siz! [VARIABLE] Skips next instruction if variable [VARIABLE]'s value is not zero.
sin  sin  [VARIABLE] Skips next instruction if variable [VARIABLE]'s value is negative.
sin! sin! [VARIABLE] Skips next instruction if variable [VARIABLE]'s value is not negative.
jmp  jmp [NAME] Jumps code execution to label named [NAME]. (Recommended to use for inifnity/for loops)
jmp! jmp! [NAME] Jumps code execution to label named [NAME] and when it hits end instruction returns to the place where it was called. (Heavily not recommended to use for inifnity/for loops)
end  end Does nothing, unless jmp! instruction was used, then it returns to the last place where jmp! instruction was called. (Recommended to use after label)
end! end!

Ends the execution of program.