[comp.sys.amiga.tech] Writing device drivers

news@bmers58.UUCP (news) (01/23/90)

A colleague is adding a 56000 to his Amiga and needs to write an
appropriate device driver. He has all the pieces (or believes he does)
but needs to know:
  o how to link it into the system
  o how to link it with the interrupt structure.

If anybody has examples of a device driver and how to build it, 
pointers would be greatly appreciated.

Thanks again,
Keith Hanlan
Bell-Northern Research, Ottawa, Canada 613-765-4645
uunet!bnrgate!atreus!keithh or (via bitnet) keithh@bnr.ca

cmcmanis@stpeter.Sun.COM (Chuck McManis) (01/24/90)

In article <1269@bmers58.UUCP> uunet!bnrgate!atreus!keithh (Keith Hanlan) writes:
>A colleague is adding a 56000 to his Amiga and needs to write an
>appropriate device driver. He has all the pieces (or believes he does)
>but needs to know:
>  o how to link it into the system

Put it into the DEVS: directory, and call it xxx.device. To load it into the
system, just call OpenDevice() with it's name. Poof! it's loaded. The other
way to do this is to put it into the Expansion drawer with an icon. Read
the section in the autodocs about the expansion device architecture. This
will only work if the Binddrivers command can find your "expansion board".

>  o how to link it with the interrupt structure.

When your device is loaded it goes through some initialization code, it 
should probably add itself to the appropriate interrupt server chain at
that time.

>If anybody has examples of a device driver and how to build it, 
>pointers would be greatly appreciated.

There is one on BIX and possibly on one of the Fish disks called 
mydev I'm not sure it uses interrupts though.


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"