Quick Assembly SDK for TI's

This program takes a high level language of my creation and generates an optimized .asm version for compilation with Assembly Studio 8X 4.0. Also it converts bitmaps to assembly files for both z80 and 68k.

Notes:
Look at test.txt for syntax and examples.
All QASM commands MUST be spaced from the
left edge. Else THEY WILL NOT PROCESS.
Expect much more in future versions. You
can add assembly code betweenn the QASM code.



To run it use command line, ie:

./qasm [inputfile] [outputfile] [Other] [Width] [Height] [Style]

The green text means optional values.
[inputfile] and [outputfile] can have any extension.
Here are the supported conversions for [Other]:
[Other]TI:Shell:
82TI-82Crash
83TI-83None
Ion1TI-83Ion 1.6
8XTI-83+/84+None
Ion2TI-83+Ion 1.6
MirageOSTI-83+MirageOS
DoorsCSTI-83+DoorsCS
86TI-86None


Converting Monochrome Bitmaps:
[inputfile] must be a monochrome bitmap.
[outputfile] should be a .asm or .inc file.
[Other] must be the 3 letters: PIC
[Width] and [Height] can fit any sprite or TI screen size up to 320x240.
[Style] is z80, 68k, or C for the data output.


Known Bugs:
NONE :-)

Here are the currenly supported commands:
Return
BusyOn
BusyOff
NewLine
Stop
Pause
ClLCD
DispG
ClrScrn
HomeUp
BigText
InvText
ClrGraph
SmlText
GetKey
Sprite
PutBig
PutSml
PutCbg
PutCsm
Is_A
For
EndFor
Shade
Copy


Return:
It returns, simply the 'ret' command.

BusyOn: (not on the 82)
Turns on the busy indicator.

BusyOff: (not on the 82)
Turns off the busy indicator.

NewLine:
Goes to the next new line.

Stop:
Exits to the OS or shell, no Q's asked.

Pause:
Waits for ENTER to be pressed. On the 82 it adds a
routine for optimal usage.

ClLCD:
Clears the LCD

ClrScrn:
Clears the screen, and possibly the text shadow.

HomeUp:
Puts cursor at top row or scroll it up.

BigText($XXYY,String):
Puts 'String' at $XXYY on the screen in the normal size
font. This adds a routine at the end of the source for
optimization reasons.

InvText:
Inverts between font 'colors'. Run once and get white on
black, once more and back to normal. This adds a routine
at the end of the source for optimization reasons.

ClrScrn:
Clears the graph screen; use's Dark Ryder's routine - no need
to explain. This adds a routine at the end of the source
for optimization reasons.

SmlText($XXYY,String):
Puts 'String' at $XXYY on the screen in the small size
font. This adds a routine at the end of the source for
optimization reasons.

GetKey:
Waits for a key to be pressed, stored in register A.

Sprite($XXYY, $ZZZZ, Addr):
Puts a $XX bytes wide by $YY pixels tall sprite at $ZZZZ.
Use caution when playing with $ZZZZ & $XXYY.

PutBig(String):
Puts 'String' on the screen in the normal size font.

PutSml(String):
Puts 'String' on the screen in the small size font.

PutCsm(ASCII):
Puts ASCII character on the screen in the small size font.
Advances Cursor

PutCbg(ASCII):
Puts ASCII character on the screen in the normal size font.
Advances Cursor
Is_A(Value):
Compares register 'a' to the Value (0-255)

For(Label,$XX):
This setups a decreasing loop (djnz) labeled 'Label', and is quite stict with $XX; it must be a hex style byte. Also,
it uses the stack to keep track of the b register (push bc).
EVERY For( ) COMMAND MUST HAVE AN EndFor( ) COMMAND OR CRASH!!!

EndFor(Label):
This ends a decreasing loop (djnz) labeled 'Label', Also,
it uses the stack to keep track of the b register (pop bc).
EVERY EndFor( ) COMMAND MUST HAVE A For( ) COMMAND OR CRASH!!!



The 8 Conditions:
c - Carry, meaning a comparison's result carries
QASM Example: C_ClrLCD

nc - Not Carry, meaning a comparison's result doesn't carry
QASM Example: NC_DispG

z - Zero, meaning a comparison's result is zero
QASM Example: Z_Pause

nz - Not Zero, meaning a comparison's result isn't zero
QASM Example: NZ_Return

p - Positive, meaning a comparison's result is positive
QASM Example: P_Stop

m - Negative, meaning a comparison's result is negative
QASM Example: M_NewLine

po - Parity Odd, meaning a comparison's result has odd parity
QASM Example: PO_BusyOn

pe - Parity Even, meaning a comparison's result has even parity
QASM Example: PE_GetKey

These 8 apply to:
TI-83, 86: all commands but PutBig, PutSml, BigText, SmlText, Sprite, PutCbg, and PutCsm.
TI-83+: Only works with Return, DispG, InvText, ClrGraph, and Stop. No Stop in MirageOS.
TI-82: Only works with Stop, Return, Getkey, InvText, ClrGraph, and Pause.
Does NOT work with the For( ), EndFor( ) loop.


Please report any bugs to me, William White.