Axe Parser v0.0.4


Currently Supported Commands

Command Description
: The colon and enter key count as terminating whitespace. They simply end the previous expression. Spaces are non-terminating whitespace and do absolutely nothing.
' The single quote is a single line comment. Whatever follows will be ignored until the next newline. Must be the first character on the line.
ClrHome Erases the screen and moves the cursor to the upper left corner.
ClrDraw Erases the buffer.
DispGraph Draws the buffer on the screen.
DiagnosticOn Turns on the run indicator (marching ants). Program will display "done" after finishing.
DiagnosticOff Turns off the run indicator. Program will not display "done" after finishing.
Asm(HEX) Native assembly code written in hexadecimal will be inserted at the current position in the code.
Lbl LBL Creates a label at the current position in the code.
Goto LBL Jumps to the given label.
DelVar LBL Frees the label from memory. It can then be redefined and reused somewhere later in the code.
Sub(LBL) Calls the given subroutine.
Return Returns from a subroutine. Also, if the statement was not in a subroutine, the program will end.
ReturnIf EXP A conditional Return. In other words, it will only return from the subroutine if the expression is true.
getKey Expression becomes the last key pressed. It is zero if no keys are pressed.
rand Expression becomes a random 16-bit number.
"" Creates a non-terminating string in memory.
""NAME Creates a terminating string in memory and names it.
[HEX] Writes the data to memory.
[HEX]→NAME Writes the data to memory and names it.
VAR The expression becomes the value of the variable.
EXPVAR Stores the previous expression into the variable.
-EXP The expression is negated. That's a negitive sign, not a minus sign!
EXP1+EXP2
EXP1-EXP2
Expression2 is added to or subtracted from expression1.
EXP1*EXP2
EXP1/EXP2

EXP1^EXP2
Expression1 is multiplied, divided, or the modulus of expression2.
EXP1=EXP2
EXP1EXP2
EXP1<EXP2
EXP1EXP2
EXP1>EXP2
EXP1EXP2
Becomes 1 if the statement is true and 0 if it is false.
EXP1 or EXP2
EXP1 and EXP2
EXP1 xor EXP2
Does the bitwise operation of expression1 with expression2.
Pause EXP Pause for the given amount of time in milliseconds.
If EXP
code1
End
Code1 will be executed only if the expression is true.
While EXP
code1
End
The expression is first checked. If it is true, Code1 will be evaluated over and over until it is false.
Repeat EXP
code1
End
The expression is first checked. If it is false, Code1 will be evaluated over and over until it is true.
For(VAR,EXP1,EXP2)
code1
End
The variable is initialized with expression1. Until the variable is greater than expression2, code1 is executed and the variable is incremented.
Disp EXP The value of the expression is displayed at the current cursor position. The cursor is then advanced 5 spaces.
Disp NAME The string is displayed at the current cursor position. If it reaches the end of the screen, it will loop around to the next line.
Disp "" The terminating string is displayed at the current cursor position, but is not saved in the memory.
Disp i New line character. The cursor is advanced to the next vertical line. This is the imaginary, not lowercase 'i'.
Output(X) The cursor is moved to the coordinate position (X/256,X%256).
Output(X,Y) The cursor is moved to the coordinate position (X,Y).
Output(X,Y, The cursor is moved to the coordinate position (X,Y) and whatever follows is displayed at that position.
Pxl-On(X,Y) A pixel becomes black at the given position on the buffer.
Pxl-Off(X,Y) A pixel becomes white at the given position on the buffer.
Pxl-Change(X,Y) A pixel will change color at the given position on the buffer.
pxl-Test(X,Y) Expression becomes 1 if pixel is black and 0 if pixel is white on the buffer.


Documentation for Axe Parser
Copyright (c) 2010 Kevin Horowitz