Contents of Companion Disk Number 2 for the Amiga ROM Kernel Reference Manual: Libraries & Devices Copyright © 1990 by Commodore-Amiga, Inc. Addison-Wesley Publishing Company, Inc. ISBN 0-201-18187-8 Copyright © 1990 Commodore-Amiga, Inc. These examples are provided in electronic form by Commodore-Amiga, Inc. for use with the 1.3 revisions of the Addison-Wesley Amiga reference manuals. The 1.3 Addison-Wesley Amiga Reference Manual series contains additional information on the correct usage of the techniques and operating system functions presented in these examples. The source and executable code of these examples may only be distributed in free electronic form, via bul- letin board or as part of a fully non-commercial and freely redistributable diskette. Both the source and executable code (including comments) must be included, without modification, in any copy. These examples may not be published in printed form or distributed with any commercial product. However, the programming techniques and support routines set forth in these examples may be used in the development of original executable software products for Commodore Amiga computers. All other rights reserved. These examples are provided "as-is" and are subject to change; no warranties are made. All use is at your own risk. No liability or responsibility is assumed. Devices devices/audio/ Audio1.c - A program which makes a simple beep-tone. Audio2.c - A program which plays IFF standard 8SVX sample files. Samples larger than 128K are played using double-buffering. devices/clipboard/ clip.c - clipboard example read/write/post cbio.c - clipboard io support routines (linked with clip.c) devices/console/ console.c - attach console to Intuition window, use/parse CSI sequences devices/input/ inputset.c - Example of how to change the key repeat timings of the input device. inputmake.c - Example of how to add input events to the system input food chain. inputswap.c & inputhandler.a - Example of an input handler. This example "correctly" swaps the left and right mouse buttons. devices/gameport/ joy.c - system compatible high level access to gameport for joysticks devices/keyboard/ keymatrix.c - Example of reading the keyboard key-state matrix from the keyboard device. keyinput.c - Example of how to ask for keyboard events directly from the keyboard device. This example is only good for programs that take over the system. keyreset.c & keyhandler.a - Example of how to install a *RESET* handler into the keyboard device. The handler could then do some minor work before the system really did the reset. devices/narrator/ Narrator.c - Shows how to make speech with the narrator device using phonemes generated by the translator library from ASCII text. Also shows how to use the narrator's mouth-shape data. devices/parallel/ parallel.c - Simple no tricks example of parallel.device usage parallel2.c - Simple no tricks example of parallel.device usage parallel3.c - Simple, abortable example of parallel.device usage devices/printer/ epsonq/ - example printerdriver for EpsonQ epsonx/ - example printerdriver for EpsonX hp/ - example printerdriver for HP LaserJet xerox/ - example printerdriver for Xerox 4020 wd/windowdump - shows the usage of printer IO. devices/sampledevice/ sample.device.asm - sample exec device for Expansion or devs (ram disk) devices/serial/ serial.c - Simple no tricks example of serial.device usage serial2.c - Complex tricky example of serial.device usage devices/timer/ GetSysTime.c - Shows how to do a simple date function based on system time. TimeMath.c - A simple demo of the 3 timer math functions. TimerTest.c - Shows how to display and change system time and perform simple delay functions. devices/trackdisk/ trackcopy.c - This copies DF0: to DF1: on a track by track basis. It is an EXACT copy using TD_READ and TD_FORMAT. It also shows some of the other TD_ commands. Libraries libraries/expansion/ autoboot.asm - assembler autoboot ROM driver code fragment findboards.c - FindConfigDev example prints info on configured boards libraries/layers/ layer.c - overview of layers usage. libraries/samplelibrary/ sample.library.asm - sample run-time library with .lib, fd's, pragmas include/ test/ lib/ library/ libraries/workbench/ prargs.c - prints out passed CLI or Workbench args rkm_icon_example.c - creates a project icon, demonstrates ToolType use startup/ - sample Amiga startup code for C or assembler Resources resources/misc/ FlushDevice.c - Code fragment which shows how to expunge a device - this is needed to get the serial port back after a printer driver has opened and closed it. resources/potgo/ read9n5.c - Code that shows how to directly read pins 9 and 5 of the second gameport (non-mouse port) using the potgo.resource.