EasyManua.ls Logo

Atari ST series - Page 146

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 7
ters. The registers used, and the values returned in them, are
listed below:
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 Al. 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-
Register
Contents
DO
AO
Al
Pointer to base address of line A variable table
Pointer to base address of line A variable table
Pointer to a null-terminated table of pointers to the
system font headers
Pointer to a null-terminated table of pointers to the line
A routines
A2
138

Related product manuals