MTS 8: LISP and SLIP in MTS
June 1976
Initialization. SLIP requires that the program first call the
subroutine INITAS which sets up 10 public lists with the symbolic
aliases W(1), W(2), ..., W(10). The subroutine has two arguments,
INITAS (SPACE,NDIM), that refer to the name and the dimension of the
one-dimensional array of free space. If we intend to use these public
lists then we must first declare¹
COMMON/PUBLIC/W(10)
The variables SPACE and W must be declared DOUBLE PRECISION.
The argument SPACE is the name of a DOUBLE PRECISION linear array of
dimension NDIM. In our system the user need not make of this space
assignment if he sets NDIM to a negative integer; the magnitude of this
integer will be used as an estimate of the number of pages of memory
initially assigned. The integer is rounded up, modulo 4096. In any
event space is acquired as needed. Under these conditions SPACE does
not have to be dimensioned but must be declared DOUBLE PRECISION.
Alternately, if SPACE is dimensioned NDIM, and NDIM is positive, then
this will be the assigned space for the available space list of NDIM/2
SLIP cells. Should all the available space be exhausted SLIP will
abruptly terminate execution with announcements when additional space is
sought.
Another point to be noted here, but which has no effect on the user,
is that in our SLIP system the available space list is a linked list of
one-directional pointers whose starting and ending names are stored in
FAVSLC and LAVSLC respectively.
Processes Affecting the Available Space _______________________________________
A basic operation, creating a list, is done by the function
LIST(LST)
Both its returned value and the value of its argument are the aliases of
the newly created empty list. We can, for example, write
DM2 = LIST(STACK)
and refer to the same list by the names DM2 and STACK. We are, of
course, also permitted to put
--------------------
¹Normally AVSL and W were maintained in unlabeled COMMON; we have
elected to use FAVSLC and LAVSLC for AVSL and labeled common PUBLIC, a
deviation from the early SLIP implementation. Also only 10 public
lists are created in this version of SLIP; early SLIP implementations
use 100.
120 SLIP