Commands

Available Armstrong functions.


Define

Macro that sets a memory address to the
given values before the program is executed.
Only constants can be used as Values.

Syntax

define <Address> <Value>

As of v2.0.0-alpha you can also use an equals sign, = , between the Address and Value. This is optional and does not remove the previous functionality.

define <Address> = <Value>

Example

define 0xff2 33
define $var = 6



Change

Assigns the given address the supplied value.

Syntax

change <Address> = <Value>

Example

change 0xff2 = 19
change $cursorChar = 8



Add / Subtract / Multiply / Divide

Combines the two given values depending on the
operator and saves the result at the given address.
The outout location is prefixed by an arrow, ` -> `

Syntax

<Operator> <Value A>, <Value B> -> <Output_location>

Example

add $X , $Y -> $Z  //  Z = X + Y
mult $X , $Y -> $Z //  Z = X * Y
sub $X , $Y -> $Z  //  Z = X - Y
div $X , $Y -> $Z  //  Z = X / Y
and $X , $Y -> $Z  //  Z = X & Y
or $X , $Y -> $Z   //  Z = X | Y
not $X -> $Z       //  Z = ~ X
bsl $X , $Y -> $Z  //  Z = X << Y
bsr $X , $Y -> $Z  //  Z = X >> Y



Goto

Jumps to the given address or label.

Syntax

goto <Address>

Example

goto #mainLoop



Goto If

Jumps to the given address or label if the
comparison of the two values return true.

Syntax

gotoif <Value A> <Comparator> <Value B> , <Address>

Example

gotoif $var < 4095 , #colorScreen
gotoif $var == 4095 , #colorScreen



If

Enters the logic block if the comparison
of the two given values returns true.
The block must be ended with the endif command.

Syntax

if <Value A> <Comparator> <Value B> :

    <Contents>
    
endif

Example

if $ballPosY > 62:
    change $ballVelY = 1
endif