*** Welcome to piglix ***

FOCAL (programming language)


FOCAL is an interpreted programming language resembling JOSS. The name is an acronym for Formulating On-Line Calculations in Algebraic Language.

Largely the creation of Richard Merrill, FOCAL was initially written for and had its largest impact on the Digital Equipment Corporation's (DEC's) PDP-8 computers. Merrill wrote the original (1968) and classic FOCAL-69 interpreters for the PDP-8. Digital itself described FOCAL as "a JOSS-like language."

Like early versions of BASIC, FOCAL was a complete programming environment in itself, requiring no operating system. As in MUMPS, most commands could be, and in practice were, abbreviated to a single letter of the alphabet. Creative choices of words were used to make each command uniquely defined by its leading character. Digital made available several European-language versions in which the command words were translated into the target language.

FOCAL ran on very low-end PDP-8 systems, even systems with only 4K words (6K bytes) of memory and lacking mass storage. The FOCAL interpreter was written in very tight assembly language and typically used only 3K 12-bit words, leaving a somewhat limiting 1K words to hold the user program, and variables.

If the system was upgraded by adding one or more extra 4K banks of memory, FOCAL could use that extra memory, either for a single user, or split the extra memory across several time-sharing users. FOCAL made extensive use of interrupt-driven terminal I/O, so it could keep four teleprinters busily whirring with nary a pause.

Memory space was too precious for storing textual error messages, so FOCAL used a clever work-around: error messages instead displayed the start address of the error-managing routine as a floating-point number. For example, in the FOCAL-69 implementation the division by zero error was managed by code starting at memory address octal 4333; division by zero at a program line numbered 01.10 produced the error message ?28.73 @ 01.10, where 28.73 represents memory page 28 plus an offset of 73 words. Most FOCAL sites had an "error number to error message" listing taped up near the terminals.


...
Wikipedia

...