Pl2 LINEA.DOC
--------------------
CHAPTER NR°8:
THE LINEAS
--------------------
*** INTRODUCTION ***
--------------------
- LineAs are graphical functions, they are very simple
but have the advantage of being really very fast.
(Much more than the VDI...)
LineAs are commands of the 'BLITTER', i.e., it is the HARDWARE
(Some PHYSICAL components of the computer and the routines that
are executed by the PROCESSOR himself.) that execute these func-
tions and not the SOFTWARE (The SOFTWARE part of your computer:
ROM, programs...).
If your ST is equipped with the BLITTER of course... (The MEGA 2ST and the
MEGA 4ST are equipped.)
NB: There is a SOFTWARE version of the BLITTER that is available in the public
--- domain in the form of a desktop accessory...
These functions are very fast since not coming from the SOFTWARE, the
routines do not need to be interpreted by the PROCESSOR.
- To call the LineAs functions, you will have to provide the appro-
priate parameters in the VDI TABLE and also in an INTERNAL TABLE
specific to LineAs.
Some registers will also be used.
Indeed, the LineAs use the VDI's CONTROL, PTSIN, PTSOUT,
INTIN, and INTOUT arrays.
Registers d0, d1, d2, a0, a1, a2 will also be used, so you will have
to be careful not to lose their content...
Some parameters are also provided by the LineAs in return in
d0, a0 or INTOUT (here again, be careful not to lose d0!)
We have seen that the LineAs use an INTERNAL TABLE:
It is in this table that the functions search for the parameters
that we have deposited, the only problem is that the location of this
internal table varies (hence its name).
To find the location of this internal table, just
call the function $A000 with:
DC.W $A000
What a strange syntax isn't it??
The explanation is very simple: During the ASSEMBLY step of your
listing, the ASCII codes representing the instructions and their operands
will be translated into BINARY because the 68000 only recognizes
information coded in binary:
Thus, a NOP will be translated by %100111001110001, a RTS by %0100111
001110101 etc... and so for all instructions.
If we translate these codes from binary to HEXADECIMAL, we obtain
instructions coded in HEX:
Thus, NOP will be written: $4E71
and RTS will be written: $4E75
etc...
However,
--
You can REPLACE, in an ASSEMBLER program, an instruction
by its HEX CODE equivalent if it is declared as such in
the TEXT segment, it would suffice to write:
DC.W $4E71 instead of a NOP (or DC.B $4E, $71)
or
DC.W $4E75 instead of an RTS ... (or DC.B $4E, $75)
This remains valid for all the instructions of the 68000 (Even for
labels).
But,
----
No 68000 instruction will be coded in HEX by a WORD of type:
$A... (or $F...)
We have therefore filled this lack (we rather took advantage of it!) by coding
the LineAs functions in $A...
NB: There are also $F... routines but we will not use them
-- because they are not compatible between the OLD ROM and NEW ROM versions
of the ST.
It will therefore suffice to write DC.W $A... for the 68000 to decode this
instruction by the LineA instruction of code $A...
There are a total of 16 commands that are installed and that can
be translated this way, these are the 16 LineAs routines:
To call them simply DECLARE them in the TEXT segment:
The LineAs:
-----------
$A000: Installs the internal table
$A001: Places 1 point on the screen
[...]
Back to ASM_Tutorial