* px - UNIX Pascal interpreter
* Written by Bill Joy and Chuck Haley
* Based on an earlier version by Ken Thompson
* Px is described in detail in the "PX 1.0 Implementation Notes"
* The source code for px is in several major pieces:
* int.c C main program which reads in interpreter code
* 00int.s Driver including main interpreter loop
* dd*.s Where dd are digits, interpreter instructions
* grouped by their positions in the interpreter table.
* p*.c Various C language routines supporting the system.
* In addition there are several headers defining mappings for error
* messages names into codes, and a definition of the interpreter transfer
* table. These are made by the script Emake in this directory and the scripts
* in the directory '../opcodes'.
* Pascal runtime errors cause emulator traps
* to the routine onemt which transfers to the
* routine 'error' in the file perror.c to decode them.
* This method saves at least one word per static error.
* Definitions for memory allocation
* Memory allocation routines are in 'palloc.c'
char *bottmem
, *memptr
, *high
, *maxstk
;
* The file i/o routines maintain a notion of a "current file".
* The printing name of this file is kept in the variable
* "file" for use in error messages.
* The entries in the display point to the active static block marks.
* The first entry in the display is for the global variables,
* then the procedure or function at level one, etc.
* Each display entry points to a stack frame as shown:
* --------------- <-- display entry points here
* The information in the block mark is thus at positive offsets from
* the display pointer entries while the local variables are at negative
* offsets. The block mark actually consists of two parts. The first
* part is created at CALL and the second at entry, i.e. BEGIN. Thus:
* -------------------------
* -------------------------
* | Current section name |
* | Saved file name and |
* -------------------------
* Random number generator constants
* Structures to access things on the stack