[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