Please note that this is only a preliminary description of the level 2.0 I/O Subsystem.
Due to limited resources, it is our desire to maintain no more than one version of the interpreter for each processor. At the same time we face wide variations in the peripherals which may be encountered. Therefore, we at UCSD sought a scheme by which the code in RSP could be frozen while still allowing for different peripherals. The structure which we have devised is conceptually similar to that used by Digital Research in their CP/M operating system For 0080's and Z-80's. That is. a standard interface has been defined between the configuration- independent RSP/IO code and a configuration- specific Basic Input/Output Subsystem (called BIOS) which performs the actual I/O. The semantics of a call to BIOS have been clearly defined as far as what the Pascal level needs to sees but BIOS is allowed to keep all sorts of hairy details (e.g. track and sector numbers, sector interleaving) to itself.
Thus we have the UCSD Pascal I/O Hierarchy shown in figure 1.0: The Pascal user's I/O calls (e.g. WRITELN, READLN, GET and PUT) are mapped bq the Pascal compiler and operating sgstem into calls on RSP (i.e. UNITREAD, UNITWRITE). RSP/IO itself calls BIOS which controls the actual device operations. It is important for the reader to recognize that we are here discussing a SYNCHRONOUS I/O system. In other words when an I/O request has been initiated by a Pascal program, control does not return to that program until the I/O operation is completed. It is anticipated that, eventually, a similar I/O system will be specified with asynchronous or “immediate return” capabilities, probably based on the asynchronous system now in use with UCSD Pascal on the PDP-11.
"Pascal level" PASCAL USER | V PASCAL SYSTEM | - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - "Interpreter Level" | (Run-time Support Package) | unit no., data area address, | byte count | [, block no., control word] V UNIT I/O (param checking) | V ,--------------------------------------------------------. | | | | |Console |Printer |Disk |Remote V V | V SPECIAL CHAR SPECIAL CHAR | SPECIAL CHAR HANDLING HANDLING |drive no., HANDLING write| |read | |data area | | | | |addresss | single| |single |single |byte count |single data| |data |data |logical |data byte| |byte |byte |block no., |byte | | | |control word | - - - - | - | - - - - - - - - | - - - - - - - - | - - - - - - - - | - - - - "BIOS | | | | | Level" | | V V V | | PRINTER DISK SERIAL LINE | | PRIMITIVES FORMATTER PRIMITIVES ,--' `------. (Map logical | | blocks into | V track and sector) | TYPE-AHEAD | | QUEUE V | | DISK | V PRIMITIVES | SPECIAL CHAR | HANDLING | (start/stop, alpha lock, flush, break) | | V V SCREEN KEYBOARD PRIMITIVES PRIMITIVES |
Figure 1.0 — Pascal I/O System Hierarchy |