Atari ST series Technical Reference Manual page 146

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

ters. The registers used, and the values returned in them, are
listed below:
Register
D O
Pointer to base address of line A variable table
A O
Pointer to base address of line A variable table
Al
Pointer to a null-terminated table of pointers to the
system font headers
Pointer to a null-terminated table of pointers to the line
A2
A routines
The first value, a pointer to the base address of the line
A variable table, is returned in both the DO and AO registers.
All addresses in the line A variable table are calculated as off­
sets from this value. For example, the INTIN variable is lo­
cated at base + 8. Therefore, after the $A000 call, you could
access INTIN by using the expression 8(A0). Since some of
the line A routines alter the contents of register AO, you may
wish to save the base address in memory, or in a "safe" reg­
ister like A3-A5. That way, once you've made the $A000 call
and established the base address of the variable table, you
needn't call it again later in your program.
The second value the Init call returns is a pointer to the
system font header table in register A l. This information is
useful for setting the font used by the TextBlt function
($A008) to print text. The font header table is a list of ad­
dresses of font headers for the various system fonts. Each
item in the list is a four-byte longword address and there's
an entry of OL to mark the end of the list. Currently, this ta­
ble has three entries that point to the headers for the three
ST system fonts: The 6 x 6 font; the 8 x 8 font; and the
8 x 16 font. Each header is 87 bytes long and contains such
information as the name of the font, the font ID, the font
size, first character, last character, cell width and height, and
so on. Complete information about the font headers may be
found in Appendix C of COMPUTEI's Technical Reference
Guide, Atari ST Volume One: The VDL
The last item returned by the Init call is a function table
which is placed in register A2. This table contains 16 entries,
each of which is the longword address of one of the line A
routines. By indexing into this table, you may call the line A
subroutines directly, using the JSR instruction: For instance,
use JSR 4(A2) to call function $A001. This saves time nor-
138
CHAPTER 7
Contents

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents