1 Atari Assembler Course Session 9 -------------------------------- Atari Operating System Overview The 10K Operating System in the Atari computers has five main functions: power-up Monitor, Interrupt Processor, I/O Utility, Vertical-Blank Processor and Floating-Point routines. The ROM also includes the default character set. The system routines that are available to us are vectored through ROM "Jump Tables". 9.1 Power-up Monitor The Monitor initializes the memory, resident handlers and hardware when the computer is turned on; this is refered to as "Coldstart". The key causes a "Warmstart" which initiates much the same as coldstart. We may "steal" the System/Reset vector for our own initialization purposes. The power-up routines also check for cartridges, the disk drive or a cassette in that order. The details of how to use these features are given in the Atari PCS O/S User's Manual. 9.2 O/S RAM and ROM Vectors The interaction of our program and the O/S must take place through the system vectors. The RAM vectors hold the address of the O/S routines (or ours!) for interrupt-level processing. The Display list, Vertical Blank, Serial I/O and POKEY-timer interrupts are all vectored here. The ROM vectors give us a gate-way to the O/S routines. These three-byte entries are actually JMP instruction to the real routine in the ROM. This table will always be at the same addresses in all revisions of the O/S to insure proper entry. The routines that we will be most interested in are the Resident Disk Handler, the Central I/O Utility and the Vertical Blank routines. An outline of these vectors is given in "De Re Atari" on pages 8-12 thru 8-21. 9.3 Central I/O Utility and Device Handlers The CIO Subsystem is the device-independent Utility that handles input and output for all devices. This capabilty was modeled after I/O systems in larger computers and handles byte and record transfers, multiple open device/files and error handling independent of device type. CIO takes our commands and passes control to the appropriate device handler which performs the actual I/O. The O/S contains Resident Handlers for Cassette, Keyboard, Screen, Editor and Printer. The best feature of CIO is the ability to add non-resident devices to its list such as the disk, modem and other "add-ons". To use CIO, we must converse with it through one of eight I/O control Blocks or "IOCB'S". These RAM blocks of 16 bytes each begin at $340 and contain values for the command, status, buffer length, buffer location, and auxiliary info for our I/O operation. After supplying this data to the IOCB, we then call the CIO routine with the value of the IOCBx16 in the X-register. A JSR CIOV ($E456) will perform the I/O and return the status in the Y-register. The programmer must remember what IOCBs he his using and must open them before and close them after use. Refer to pages 8-22 thru 8-34 in "De Re Atari".