Atari DOS 2.5: XF551 Owner's Manual page 59

Atari dos 2.5 disk drive
Table of Contents

Advertisement

(HIGH) Hex. The
INIT
address is always stored in Locations 2E2
(LOW) and 2E3 (HIGH) Hex.
Remember,
the INIT address is exe-
cuted as soon as
it
is loaded
,
so the code
that
it points to must
have been previously
loaded
.
Note:
lOCB #1
is open during the
execution
of code pointed to
by any INIT address.
For
this reason
it
is not available and must
not be tampered with by the
user program
being executed
.
Using Binary Save With Optional Parameters
The example below ill ustrates an assembly language program
that uses a data area that must be initialized before the main
program can use it
.
Suppose the
initialization
code resides from
address 4000 (Hex) to 41
FF
(Hex) and the
main
program resides
between 4200
(Hex)
and
4FFF
(Hex).
For
purposes of illustration
,
assume that
both
the
initialization
code and
main
program can
·
tain executable code and the initialization code ends with an RTS
(RETUR
N).
In the following example
,
it
is assumed that the program
LAGP RG.OBJ is already
in
memory.
Example
2:
SELECT ITEM OF: [""""
[
FOP I1EI1U
K [""""
I
SAUE-GIUEFILE,STAPT,END
(
,INIT,F:UN)
LAGPRG
.
OBJ, 400(1,
4FFF,
4000,
4200j
Aew-n
1
The following events
will
occur on loading
t
his file into memory:
1.
Memory from 4000 to 4FFF will be filled with the program
.
2.
The INIT address 4000 (Hex) is stored in Memory Locations
2E2 and 2E3 (Hex).
3. Initialization program from 4000 to 41 FF will execute.
4. The RU
N
address 4200 (Hex) is stored in Memory Locations
2EO and
2El
(Hex).
49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xf551

Table of Contents