Download Print this page

Commodore Amiga A500 Technical Reference Manual page 58

Hide thumbs Also See for Amiga A500:

Advertisement

6.
InitResident
( )
the loaded code. If an error (NULL) is returned,
UnLoadSeg
( )
the segment.
your driver code:
Find the list of boards. Mark them a configured, and record your
driver in them (for system debugging). Return non-zero value
if
everything went ok. If something went wrong (or you just want
to be unloaded) then return NULL.
Now for some more detail.
1.
GetDiskObject
( )
is a routine in icon.library. It will read in the disk
object, and return a pointer to it. Part of a disk object structure
is a "tooltypes" field.
2.
The FindToolType
( )
routine (also in the icon.library) searches
the tooltypes database associated with the disk object. If there is
an entry for PRODUCT then it is assumed that this is an info file
for a driver. The PRODUCT field is of the format:
PRODUCT
=
<idlist>
<idlist>
::
=
<id> ( <idlist>BAR<id>
<id>
::=
<manufacturer>
I
<manufacturer>SLASH<product>
<manufacturer>
::
=
<a decimal number>
<product>
:: =
<a decimal number>
BAR
::
=
<a vertical bar
-
' l ' >
SLASH
::
=
<a forwards slant char
-
'/'>
Spaces are not legal. Some examples:
PRODUCT
=
1000130
;
matches man
1000,
product
30
PRODUCT
=
l000
;
matches any man
l000
board
PRODUCT
=
1000R011000R1
;
matches man
1000,
product
20
or
21
3.
Each unconfigured board in the system is searched. An unconfi-
gured board has the CDB-CONFIGME bit set in the cclFlags byte.
Search all these unconfigured boards t o find the ones that match
any of the product codes. Link all these boards together using the
cdNextCD field of the ConFigDev structure. Record the head of
this list, along with the product field and the name of the file that
was loaded in a CurrentBinding structure. This structure may be
retrieved via the GetCurrentBinding
( )
call.
4.
Attempt to load in the driver. The driver may be a devices, library,
task, process, or anything else that you may want. The only re-
quirement is that it have a Resident structure in its first hunk. (By
the way, this means that you can not directly use startup.obj).

Advertisement

loading

This manual is also suitable for:

Amiga a2000