1.0 Introduction

1.0 Purpose of This Document

p.1 This document is intended to provide a detailed description of the “SYNCHRONOUS” I/O Subsystem of the UCSD Pascal System (An asynchronous I/O Subsystem has yet to be fully defined at this writing). The document is intended primarily for use by persons implementing or maintaining the I/O Subsystem. It is NOT intended to serve as a user's manual for Pascal programmers.

Please note that this is only a preliminary description of the level 2.0 I/O Subsystem.

1.1 Introduction to the I/O Subsystem

The UCSD Pascal System is constructed in a hierarchical fashion (see Figure 1.0). Most of the system is written and maintained in the Pascal language and is described as the “Pascal Level”. As is discussed elsewhere the UCSD Pascal compiler generates code for an idealized processor known as the pseudo-machine. This code (known as pseudo-code or p-code) is interpreted at runtime by an assembly language program (known as the Interpreter) which emulates the pseudo-machine. Due to the processor-independent nature of the p-codes it is possible to port the entire UCSD Pascal System to a new host machine by rewriting only the Interpreter. Besides emulating the pseudo-machine, native code is also used for some time-critical functions and for dealing with such machine dependencies as input/output devices. The body of code which implements these non-emulatory functions is called the Runtime Support Package (RSP). The portion of RSP responsible for communicating with I/O devices is known as RSP/IO.

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.

p.2 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.

p.3


"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

This page last regenerated Sun Jul 25 01:09:10 2010.