This document is a technical specification for WILD (Wild Card Lookup Routine), a subroutine designed to handle complex wild-card file LOOKUPs and ENTERS across various devices within the DECsystem-10 5-series monitor.
Key Functions and Purpose:
- Centralized Directory Logic: WILD centralizes the intricate logic required for selecting and reading directories, which became highly involved under the 5-series monitor. This prevents other user-mode programs from having to replicate this complex code.
- Wild-Card Interpretation: It interprets detailed file specifications, including wild-cards, device names, structure/controller abbreviations, and ersatz devices (e.g., "SYS:", "HLP:").
- File Selection and Return: Programs call WILD with an argument block. WILD then analyzes this data, selects matching files one by one, sets up OPEN and extended LOOKUP blocks with the results, and returns control to the caller. It continues the selection process on subsequent reentries until all matches are found.
- Error Handling and Utility Routines: WILD includes routines to handle LOOKUP and OPEN errors, check /BEFORE and /SINCE date/time switches, and perform byte-level file reading.
- Primary vs. Secondary Operations:
- The primary entry point,
.LKWLD, is used for general wild-card lookups.
- A secondary entry point,
.SCWLD, is provided for handling wild-cards on output or secondary input file specifications (e.g., in utility programs like PIP), allowing wild-card patterns from a primary file to be applied to a secondary one.
Technical Details:
- File Specification Area: WILD uses a 24-word (octal) "file specification area" to store the parsed input, including masks for wild-card characters.
- Calling Convention: WILD is called via AC1 pointing to an argument block that defines the lengths and locations of various blocks (file specification, OPEN, LOOKUP).
- Resource Usage: It primarily uses channel 0 for directory I/O, releasing it between blocks. It has a fixed low-segment data base for buffers.
- Robustness: Includes "defensive halts" and comprehensive error messages to identify internal inconsistencies or invalid arguments.
The document serves as a complete guide for programmers on how to call WILD, understand its parameters, and interpret its results, without needing to delve into its internal code.