0% found this document useful (0 votes)
312 views

Commands (Axe Parser)

TI 84 Graphing Calculator Compiled Language (optimized for gaming)

Uploaded by

Calvin Leung
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views

Commands (Axe Parser)

TI 84 Graphing Calculator Compiled Language (optimized for gaming)

Uploaded by

Calvin Leung
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Axe Parser v0.2.

0
Command List Index
System Screen and Buffer Control Blocks Labels and Subroutines Basic Math Advanced Math Drawing Data and Storage File Management

System
Command _ : . DiagnosticOn DiagnosticOff Full Normal Pause EXP getKey getKey(KEY) getKey(0) SinReg WAVE,TIME Asm(HEX) Description Spaces are ignored in most situations. They mainly just help for code organization and readability. The colon and enter key end a line of code. The period is a single line comment. Whatever follows will be ignored until the next newline. Must be the first character on the line. Turns on the run indicator (marching ants). Program will display "done" after finishing. Turns off the run indicator. Program will not display "done" after finishing. Full speed mode is activated if supported, making it 3 times faster on newer calculators. Returns 0 if not supported. Full speed mode is deactivated. Pause for the given amount of time in milliseconds. Returns the last key pressed or zero if no keys are pressed. Its just like the BASIC getkey, but with different codes. Returns 1 if the key is held down this instant and 0 otherwise. The key code must be a single constant. Returns a non-zero number if any key is held down and 0 otherwise. Sound is played out of the link port. Wave must be between 1-255 inversely proportional to frequency. Time is in the order of microseconds. Native assembly code written in hexadecimal is inserted at the current

position.

Screen and Buffer


Command ClrHome ClrDraw DispGraph DispGraphr StoreGDB StorePic RecallPic DrawInv Description Erases the screen and text shadow and moves the cursor to the upper left corner. Erases the buffer. Draws the buffer on the screen. Draws the buffer on the screen over an alternating crosshatch of the back buffer. Used for grayscale. Copies the screen to the buffer. Copies the buffer to the back-buffer. Copies the back-buffer to the buffer. The colors on the buffer are inverted.

Horizontal + The buffer is shifted right (+) or left (-) by 1 pixel. White pixels are shifted in. Horizontal Vertical + Vertical The buffer is shifted down (+) or up (-) by 1 pixel. New pixels are not shifted in, that row remains the same.

Shade(EXP) Sets the contrast. 0 is lightest, 63 is darkest.

Control Blocks
Command If EXP code1 End If EXP code1 Else code2 End !If EXP code1 End !If EXP code1 Else code2 End Description If the expression is true, code1 will be executed.

If the expression is true, then only code1 is executed. Otherwise, only code 2 is executed.

If the expression is false, code1 will be executed.

If the expression is false, then only code1 is executed. Otherwise, only code 2 is executed.

While EXP code1 End Repeat EXP code1 End

The expression is checked first. If its true, code1 will be executed over and over until its false. The expression is checked first. If its false, code1 will be executed over and over until its true.

For(VAR,EXP1,EXP2) The variable is initialized with expression1. Until the variable is greater than expression2, code1 is executed and the variable is code1 incremented by 1. End

Labels and Subroutines


Command Lbl LBL Goto LBL DelVar LBL Sub(LBL) Return Return!If EXP Description Creates a label at the current position. Jumps to the label. Frees the label name from memory. The name can then be reused somewhere later in the code. Calls the subroutine. All subroutines should end with a Return. Returns from a subroutine. If not in a subroutine, the program will end.

ReturnIf EXP Returns only if the expression is true. Returns only if the expression is false.

Basic Math
Command VAR EXPVAR 'CHAR' -EXP EXP1+EXP2 EXP1-EXP2 EXP1*EXP2 EXP1/EXP2 EXP1^EXP2 EXP2 EXP1=EXP2 EXP1EXP2 Description Returns the variable. Uppercase A through Z are variables. Stores the expression into the variable. Converts an ASCII constant into an integer. Returns the negative of the expression. That's a negative sign, not a minus sign! Expression2 is added to or subtracted from expression1. Expression1 is multiplied, divided, or the modulus of expression2. The expression is multiplied by itself. Returns 1 if the statement is true or 0 if its false. This is an unsigned comparison.

EXP1<EXP2 EXP1EXP2 EXP1>EXP2 EXP1EXP2 EXP1 or EXP2 EXP1 and Returns the bitwise operation of the expressions. You need parenthesis to use EXP2 this with truths. EXP1 xor EXP2 abs(EXP) (EXP) sin(EXP) cos(EXP) rand Returns the absolute value of the expression. Returns the square root of the expression. Returns the sine of the expression. One Period is 255 and the value returned ranges from -127 to 127. Returns the cosine of the expression. One Period is 255 and the value returned ranges from -127 to 127. Returns a random 16 bit number.

Advanced Math
Command
EHEX

Description Converts a 4 digit hexadecimal number into an integer. That E is the scientific notation E.

EXP1<<EXP2 EXP1EXP2 Signed comparisons for numbers that aren't always positive. Returns 1 if the EXP1>>EXP2 statement is true or 0 if its false. EXP1EXP2

Drawing
Command Disp EXP Disp EXPDec Disp EXPFrac Disp "" Disp i Description The string that is pointed to is displayed at the cursor position. The cursor moves with the string. If it reaches the end of the screen, it will loop around to the next line. The expression is displayed as a decimal at the cursor position. The cursor is then advanced 5 spaces. The ASCII character of the expression is displayed at the cursor position. The cursor is advanced 1 space. A new line is added if it hits the edge. The string is displayed at the cursor position. The cursor moves to the next line down. This is the imaginary, not lowercase 'i'.

Output(X) Output(X,Y) Output(X,Y, Pxl-On(X,Y) Pxl-Off(X,Y) Pxl-Change(X,Y) pxl-Test(X,Y) Pt-On(X,Y,PIC) Pt-Off(X,Y,PIC) PtChange(X,Y,PIC) Text(X,Y,EXP)

The cursor moves to the cursor position (X/256,X%256). The cursor moves to the cursor position (X,Y). The cursor moves to the cursor position (X,Y) and whatever follows is displayed at that position. A pixel becomes black on the buffer at (X,Y). A pixel becomes white on the buffer at (X,Y). A pixel will change color on the buffer at (X,Y). Returns 1 if pixel is black and 0 if pixel is white on the buffer at (X,Y). The 8x8 sprite that expression points to is drawn to the buffer at (X,Y). Does not clear the area behind it. The 8x8 sprite that expression points to is drawn to the buffer at (X,Y) but clears the area behind it first. The 8x8 sprite that expression points to inverts its pixels on the buffer at (X,Y). The text pointed to is drawn at (X,Y). See below for drawing details. Changes how text is drawn. Code must be a constant. 0 = Small size. Calculator should exit in this mode if changed! 1 = Large size. 2 = Normal font. Calculator should exit in this mode if changed! 3 = Inverted font. 4 = Draw to screen. Calculator should exit in this mode if changed! 5 = Draw to buffer.

Fix CODE

Data and Storage


Command "" [HEX] [PICVAR] List(NUM,...) det(SIZE) DATANAME NAME L1 Description Adds the string to program memory, but without the ending character. Adds the hex to the program memory. Absorbs the 96x63 picture from RAM into the program (756 bytes). Only the source needs the pic, not the executable. Adds the byte to program memory. Numbers ending with r are added as 2 byte numbers. Adds Size bytes of zeros to program memory. Saves the data's pointer to a static variable. Also terminates current string if applicable. Returns a pointer to the start of the data. Returns a pointer to some free memory.

L2 L3 L4 L5 L6

L1 = 714 bytes (saveSScreen+54) Volatility: LOW L2 = 531 bytes (statVars) Volatility: LOW L3 = 768 bytes (appBackUpScreen) Volatility: MED (Saving to back-buffer will corrupt) L4 = 323 bytes (tempSwapArea) Volatility: MED (Corrupt when archiving/unarchiving in program) L5 = 128 bytes (textShadow) Volatility: MED ("Disp","Output", and "ClrHome" will corrupt) L6 = 768 bytes (plotSScreen) Volatility: HIGH (Any buffer drawing will corrupt) Returns the 2 byte data the expression points to. Returns the single byte the expression points to. It will be in the range 0 to 255. Returns the single byte the expression points to. It will be in the range -128 to 127. The full 2 bytes of Expression1 is stored to where Expression2 points. The single byte of Expression1 is stored to where Expression2 points. The byte already at Ptr1 is copied to all the bytes after it until Size bytes have been filled with that value. Zero is not a valid Size. Size bytes starting from Ptr1 are copied to Size bytes starting at Ptr2. Zero is not a valid Size. Size bytes starting from Ptr1 are exchanged with Size bytes starting at Ptr2. Zero is not a valid Size.

{EXP}r {EXP} int(EXP) EXP1{EXP2}r EXP1{EXP2} Fill(PTR1,SIZE) conj(PTR1,PTR2,SIZE) expr(PTR1,PTR2,SIZE)

File Management
Command GetCalc(PTR) Description Finds the object who's name is pointed to and returns a pointer to the start of its data, or zero if it was archived or not found.

Creates an application variable in RAM, with the name pointed to, and makes it Size bytes. Returns a pointer to the start of data, or zero if there GetCalc(PTR,SIZE) was not enough RAM. Overwrites existing appvar, even if it was in archive. Unarchive PTR Tries to unarchive the object who's name is pointed to. Returns 1 if it could unarchive and 0 otherwise. Gives a memory error if not enough RAM. Tries to archive the object who's name is pointed to. Returns 1 if it could archive and 0 otherwise. Gives a memory error if not enough Flash Memory.

Archive PTR

New In This Version Changed From Last Version


Documentation for Axe Parser Copyright (c) 2010 Kevin Horowitz

Existing Command

You might also like