Quick Assembly 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 assmbly code betweenn the QASM code.
To run it use DOS Command line, ie:
qasm [inputfile] [outputfile] [Other] [Size]
[inputfile] and [outputfile] can have any extension.
Here are the supported conversions for [Other]:
[Other] | TI: | Shell: |
---|
82 | TI-82 | Crash |
83 | TI-83 | None |
Ion1 | TI-83 | Ion 1.6 |
8X | TI-83+ | None |
Ion2 | TI-83+ | Ion 1.6 |
MirageOS | TI-83+ | MirageOS |
DoorsCS | TI-83+ | DoorsCS |
86 | TI-86 | None |
Converting Monochrome Bitmaps:
[inputfile] must be a monochrome bitmap.
[outputfile] should be a .asm or .inc file.
[Other] must be the 3 letters: PIC
[Size] must 768, 1024, 2000, or 3840 for screen byte size.
Use 768 when converting a picture for the 73, 82, 83, 83+, or 84+
Use 1024 when converting a picture for the 85 or 86.
Use 2000 when converting a picture for the 89 or 89ti.
Use 3840 when converting a picture for the 92, 92+, or V200.
Syntax (.db or dc.b) is figured automatically, so don't worry.
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 |
When making programs:
Use np in place of
[size] if NOT making it for Assembly Studio 8X 4.0
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!!!
Shade( ):
Not a function yet, but planned shortly.
Copy( ):
Not a function yet, but planned shortly.
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.