This document is an assembly language listing for PTYSRF, the "Full Duplex Pseudo Teletype Service Routines," developed by M. Fredriksen for Digital Equipment Corporation in 1969.
Its primary purpose is to act as a device driver or service layer for managing input and output operations on pseudo-teletype (PTY) devices. The routines handle various aspects of PTY communication, including:
- Device Management: Initializing and defining PTY data structures, including device data blocks and unit assignments (e.g., "IPTY IS UNIT 1, PTY1 IS UNIT 2, ETC.").
- I/O Status Handling: Managing device-dependent I/O status bits such as output wait, input ready, and monitor mode.
- Buffer Management: Handling input and output buffers, including character placement, buffer filling, and end-of-string detection.
- Control Character Processing: Detecting and acting upon control characters (e.g., Ctrl-C).
- Job Synchronization: Synchronizing PTY output with input requests from "object jobs," often involving interaction with "control jobs" and managing job wake-up based on PTY I/O status.
- Mode Control: Providing routines to set and clear the PTY's monitor mode.
- Error Handling: Including mechanisms for error prevention and recovery (e.g., handling panic conditions, aborting buffers, checking for full buffers).
The document provides a detailed, commented source code listing, followed by a symbol table and cross-references, illustrating the intricate logic for managing virtual terminal interactions within a larger operating system context.