z80 » Beginner

Aliases are like AKA's. For example, 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 and sees that in there is a line of code _clrLCD =$4a7e which tells the assembler to paste $4a7e wherever it encounters _clrLCD.

#include ""
.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

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 The basic package. Great for beginners! Almost all the RAM equates for the TI86.
ROM86.h Tons of ROM equates. Lots of Absolute Address calls for variable manipulation. TI-OS math routines. Operator manipulation calls for variable math.
TI86Un Undocumented routines and flags for TI-OS.

More from z80 » Beginner
Aliases // Convert from decimal to hexadecimal or binary // Flags and Conditions // Format and Compiling // Instructions // Math // Number Bases // Oh, No! It Crashed! // Registers // TI-BASIC to Asm Comparisons // TI86 Specifications // Two's Compliment // z80 Processor