Aliases are like AKA's. For example,
ti86asm.inc
contains many common aliases which are used in your program and
the program below uses them. Line 4 contains the phrase
call _clrLCD
. The assembler looks at
_clrLCD
and looks at
ti86asm.inc
and sees
that in ti86asm.inc
there is a line of code
_clrLCD =$4a7e
which tells the assembler to paste
$4a7e
wherever it encounters _clrLCD
.
#include "ti86asm.inc" .org _asm_exec_ram call _clrLCD ;line 4 - alias _clrLCD=$4a7e ;clears screen call _homeup ;put cursor at top left of ; screen ld hl,text_to_print ;load hl with address of text ; to print call _puts ;print string on screen call _getkey ;wait for keypress call _clrLCD ;alias again! ;clears screen ret ;return from program text_to_print: .db "hey",$00 ;text to print with a zero ; at the end to tell the ; ti86 to stop printing .end
Call
is an alias too, but we'll leave explaining that
to the Opcodes Section.
Aliases make code easier to understand. Wouldn't
you rather see _clrLCD
instead of $4a7e
?
You can make your own aliases in your code if you want to which we will also learn about in the Assembler Directives Section.
Check out some additional helpful include files all of which are in the Includes Package.
File | Description |
ti86asm.inc | The basic package. Great for beginners! |
RAM86.inc | Almost all the RAM equates for the TI86. |
ROM86.h | Tons of ROM equates. |
TI86Abs.inc | Lots of Absolute Address calls for variable manipulation. |
TI86Math.inc | TI-OS math routines. |
TI86OPs.inc | Operator manipulation calls for variable math. |
TI86Un | Undocumented routines and flags for TI-OS. |