This document is an extensive assembly language listing that details the FOCAL (FOrmula CALculator) programming language implementation for the PDP-9 Advanced Software System. It meticulously outlines the FOCAL interpreter's core components, encompassing its arithmetic, floating-point, and input/output operations, alongside comprehensive memory management strategies for both single and multi-user environments. The listing systematically defines global variables, auto-index registers, and memory allocation blocks, including impure areas, reentrant and non-reentrant variables, and constants. It specifies subroutine conventions, introduces new instructions for recursive calls and data manipulation, and presents detailed command tables and internal FOCAL functions such as SIN, COS, EXP, and SQRT. Furthermore, the document elaborates on the control logic for processing commands, evaluating expressions, managing loops, handling files, and detecting errors. It includes specific routines for string and character I/O, number conversion (decimal-binary and floating-point), garbage collection, and multi-user process management, making it a complete source code reference for the PDP-9 FOCAL system.
Site structure and layout ©2025 Majenko Technologies