794-831 table which starts at 58368 ($E400). Each handler is designed with the following format: OPEN vector CLOSE vector GET BYTE vector PUT BYTE vector GET STATUS vector SPECIAL vector Jump to initialization code (JMP LSB/MSB) CIO uses the ZIOCB (see location 32; $20) to pass parameters to the originating IOCB, the A, Y and X registers and CIO. It is possible to add your own device driver(s) to OS by following these rules: 1) Load your routine, with necessary buffers at the address pointed to by MEMLO: location 743 ($2E7). 2) Add the size of your routine to the MEMLO value and POKE the result back into MEMLO. 3) Store the name and address of your driver in the handler address table; HATABS. 4) Change the vectors so that the OS will re-execute the above steps if RESET has been pressed. This is usually done by adjusting locations 12 ($C: DOSINIT) and 10 ($A; DOSVEC). See the "Insight: Atari" columns in COMPUTE!, January and April 1982, for details. The APX program "T: A Text Display Device" is a good example of a device handler application. See De Re Atari for more information on the DCB and HATABS, including the use of a null handler. --------------------------------------------------------------------------- Locations 832 to 959 ($340 to $3BF) are reserved for the eight IOCB's (input/output control blocks). IOCB's are channels for the transfer of information (data bytes) into and out of the Atari, or between devices. You use them to tell the computer what operation to perform, how much data to move and, if necessary, where the data to be moved is located. Each block has 16 bytes reserved for it. What is an IOCB? Every time you PRINT something on the screen or the printer, every time you LOAD or SAVE a file, every time you OPEN a channel, you are using an IOCB. In some cases, operations have automatic OPEN and CLOSE functions built in--like LPRINT. In others, you must tell the Atari to do each step as you need it. Some IOCB's are dedicated to specific use, such as zero for the screen display. Others can be used for any I/O function you wish. The information you place after the OPEN command tells CIO how you want the data transferred to or from the device. It is SIO and the device handlers that do the actual transfer of data.