[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The misc resource oversees usage of the serial data port, the serial
communication bits, the parallel data and handshake port, and the parallel
communication bits.  Before using serial or parallel port hardware, it
first must be acquired from the misc resource.

The misc resource provides two functions for allocating and freeing the
serial and parallel hardware.

                             Misc Resource Functions
                             ------------------------
     AllocMiscResource()     Allocate one of the serial or parallel
                             misc resources.

     FreeMiscResource()      Deallocate one of the serial or
                             parallel misc resources.

Once you've successfully allocated one of the misc resources, you are free
to write directly to its hardware locations.  Information on the serial
and parallel hardware can be found in the Amiga Hardware Reference Manual
and the hardware/custom.h include file.

The two examples below are assembly and C versions of the same code for
locking the serial misc resources and waiting for CTRL-C to be pressed
before releasing them.

     Assembly Example Of Allocating Misc Resources 
     C Example Of Allocating Misc Resources