[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

An Amiga device is a software module that accepts commands and data and
performs I/O operations based on the commands it receives.  In most cases,
it interacts with either internal or external hardware, (the exceptions
are the clipboard device and ramdrive device which simply use memory).
Generally, an Amiga device runs as a separate task which is capable of
processing your commands while your application attends to other things.


                  Table 19-1: Amiga System Devices

    Amiga Device  Purpose
    ------------  -------
    audio         controls the use of the audio hardware.
    clipboard     manages the cutting and pasting of common data blocks
    console       provides the line-oriented user interface.
    gameport      controls the two mouse/joystick ports.
    input         processes input from the gameport and keyboard devices.
    keyboard      controls the keyboard.
    narrator      produces the amiga synthesized speech.
    parallel      controls the parallel port.
    printer       converts a standard set of printer control codes to
                  printer specific codes.
    scsi          controls the small computer standard interface hardware.
    serial        controls the serial port.
    timer         provides timing functions to measure time intervals and
                  send interrupts.
    trackdisk     controls the amiga floppy disk drives.


The philosophy behind the devices is that I/O operations should be
consistent and uniform.  You print a file in the same manner as you play
an audio sample, i.e., you send the device in question a write command and
the address of the buffer holding the data you wish to write.

The result is that the interface presented to the programmer is
essentially device independent and accessible from any computer language.
This greatly expands the power the Amiga brings to the programmer and,
ultimately, to the user.

Devices support two types of commands: Exec standard commands like read
and write, and device specific commands like the trackdisk device motor
command which controls the floppy drive motor, and the keyboard device
readmatrix command which returns the state of each key on the keyboard.
You should keep in mind, however, that supporting standard commands does
not mean that all devices execute them in exactly the same manner.

This chapter contains an introduction to the Exec and amiga.lib functions
that are used when accessing Amiga devices.  Consult the Amiga ROM Kernel
Manual: devices volume for chapters on each of the amiga devices and the
commands they support.  In addition, the Amiga ROM Kernel Reference
Manual: Includes and Autodocs contains Autodocs summarizing the commands
of each device, and listings of the device include files.  Both are very
useful manuals to have around when you are programming the devices.