This document details an assembly language program for a clock service routine, dated June 2, 1965, and authored by T. Hastings. The routine manages system time, handles clock-related interrupts, and facilitates job scheduling.
Key functions include:
- Timing Intervals: The "CLOCK" routine times specified intervals and, upon expiry, triggers a "PUSHJ PDP" operation to a designated address to initiate a request.
- System Flags: It utilizes flags like
STOPU (indicating an interrupt-driven job stop and switch), SCHEDF (signaling active rescheduling), and TIME (tracking system run time in 60ths of a second).
- Interrupt Handling (APRINT, CIP0, CIP1): The routine processes "APR" (interrupt) interrupts, checking for clock enablement and determining if the clock was the source of the interrupt. It also evaluates if a job stop/reschedule has been requested via the
STOPU flag.
- Timing Request Processing (CIP4): It manages a queue of timing requests, decrementing timers and processing items when their time expires. This involves manipulating an accumulator (
TAC) for dispatching requests.
- Job Rescheduling (RSCHED/CIP6/CIP7): During a reschedule, the routine saves the state variables (such as channel ACs, user context, memory protection, job level, and UUO PC) of the current job. It then loads the state variables of the next highest-priority job from its data area, effectively restoring the new job's context before execution.
- Null Job Handling: Specific logic exists for handling a "null job," indicating that no active job needs to be saved or restored.
- Utility Operations: It includes various internal and external declarations for clock-related variables and system components.
The document also provides a comprehensive symbol table, listing all defined variables and labels with their corresponding addresses and types (internal or external).