Variables are all 32-bit integers
Case-insensitive
Single quote for line comments
Up to 14 arithmetic operations per line
Compiled to Assembly
Command
Function
GOTO @label
Jump to label
INPUT var
Input integer from serial
GOSUB @label
Jump to subroutine at label
RETURN
Return from subroutine
END
End program
PRINT var
Print variable to serial
PRINT "string"
Print string to serial
INC var
Increment variable
DEC var
Decrement variable
SETLED led, value
Set an LED
SETSEVENSEG display, value
Set seven segment display
SETGPIO pin, value
Set a GPIO pin
SETGPIOMODE pin, value
Set a GPIO pin to input or output mode
SETARDUINO pin, value
Set an Arduino pin
SETARDUINOMODE pin, value
Set Arduino pin to input or output mode
GETLED var, led
Load LED value into variable
GETSEVENSEG var, display
Load seven segment value into variable
GETGPIO var, pin
Load GPIO value into variable
GETGPIOMODE var, pin
Load GPIO mode into variable
GETARDUINO var, pin
Load Arduino value into variable
GETARDUINOMODE var, pin
Load Arduino mode into variable
SEEDRNG seed
Seed RNG with value
RANDOM var
Load random value into variable
EXITWHILE
Exit the current WHILE loop
EXITFOR
Exit the current FOR loop
EXITDO
Exit the current DO loop
Operator
Function
Precedence
|
Logical OR
11
&&
Logical AND
10
or
Bitwise OR
9
xor
Bitwise XOR
8
and
Bitwise AND
7
==
Equality
6
≠
Inequality
6
≥
Greater than or equal
5
≤
Less than or equal
5
>
Greater than
5
<
Less than
5
<<
Arithmetic shift left
4
>>
Arithmetic shift right
4
-
Subtraction
3
+
Addition
3
*
Multiplication
2
/
Division
2
mod
Modulo
2
!
Logical NOT
1
not
Bitwise NOT
1
Variables are all initialized to zero and no variable declaration is needed. Variable assignments
are in the form:
if < expression> then < statement>
if < expression> then < statement> else < statement>
Multi-line IF-ELSEIF-ELSE statement
if < expression> then
< statements>
elseif < expression> then
< statements>
else
< statements>
endif
@loop
< statements>
goto @loop
gosub @subroutine
end
@subroutine
< statements>
return
while < expression>
< statements>
wend
for < var> = < start_val> to < end_val>
< statements>
next
for < var> = < start_val> to < end_val> step < const_increment>
< statements>
next
do
< statements>
loop while < expression>
do
< statements>
loop until < expression>