FOCAL8-148B FOCL-S

Order Number: XX-CEE02-8C

This document describes FOCL.S, an expanded programming language based on FOCAL/69, designed for 8K PDP-8/12 computers. It was released by the DECUS Program Library in November 1970 as a user-contributed program without quality control or warranty.

FOCL.S is syntactically compatible with FOCAL/69 and functions as a superset, offering numerous enhancements:

Key Features and Improvements:

  • Expanded Language Capabilities:

    • Multiple Subscripted Arrays: Supports up to 8 arrays, each with up to 4 dimensions, stored in a common area. Arrays use 3 words per variable, making them more memory-efficient than "normal" variables (5 words).
    • Conditional DO Command (ON): A three-branch conditional command allowing subroutine calls based on an expression's condition.
    • Arithmetic Expressions for Line Numbers: Line numbers in DO, IF, GOTO, MODIFY, or ON commands can be computed from arithmetic expressions.
    • Extended Command Lines: Features a Control/K (CONT/K) character for continuation, allowing effectively unlimited length for direct command lines.
    • Logical AND: Introduces a logical 'AND' function for expressions (FX(3)).
  • Memory Management & Efficiency:

    • Optimized Memory Usage: Text, variables, pushdown list, and extended functions are moved to Field 1, freeing up core in Field 0 for user-defined functions and allowing a more efficient tradeoff between text storage and variables. This generally provides more available variables for programs.
  • System Interaction & Debugging:

    • Direct Core Access: The FX(1) function allows direct reading from and writing to specific core memory locations.
    • Machine Language Execution: The FX(2) function enables the execution of machine language instructions, providing direct control over specialized hardware.
    • Octal/Decimal Conversion: Includes functions for converting between decimal and octal representations (FX(8) for decimal-to-octal, FX(10) for octal-to-decimal).
    • XOD Compatibility: Provides compatibility with the XOD debugging package for easier program debugging.
    • Improved Variable Dumping: The TDUMP command lists variables in reverse order of their creation, making debugging of recently created variables more convenient.
    • Enhanced Error Diagnostics: The error recovery routine provides more unique error messages.

Compatibility Notes:

  • Superset: FOCL.S is designed as a superset of FOCAL/69, maintaining syntactic compatibility.
  • Minor Differences: The LIBRARY EXIT command has been removed (though equivalent functionality is available via FX commands), the T $ command now types variables in reverse order, and the error diagnostic list is extended.

Overall, FOCL.S aims to provide a more powerful and flexible FOCAL environment for small computers, especially through its memory management improvements, expanded language features, and enhanced system interaction capabilities.

XX-CEE02-8C
November 1970
18 pages
Quality

Original
1.0MB

Site structure and layout ©2025 Majenko Technologies