MTS 8: LISP and SLIP in MTS
June 1976
New SLIP Functions __________________
Several functions have been added to the SLIP repertoire for the IBM
SYSTEM/360/370 version:
DATUM(A) and IDATUM(A)
These functions are identical; the two names making it convenient
for INTEGER/REAL conventions. DATUM should normally be declared
DOUBLE PRECISION and IDATUM should be declared INTEGER. The value
of DATUM is the datum contained in the SLIP cell whose cell name is
A. The value of IDATUM(A) is the contents of the leftmost word of
the datum in the SLIP cell whose cell name is A.
REALL(Y)
This function is similar in purpose to INTGER. Y is assumed to be
a fullword quantity (integer or real). The value of REALL(Y) is a
doubleword consisting of Y in the left word and 0s in the right
word.
REALS(D)
This function is similar in purpose to INTGER and REALL. The
argument is assumed to be DOUBLE PRECISION (but could be REAL or
INTEGER). The mode of the function is REAL and it returns the
leftmost word of the argument without conversion.
SLPDMP
This subroutine gives a dump of all SLIP storage in a format
oriented toward the SLIP structure. It is considerably easier to
use than a regular memory dump.
SETRAC
This function, whose arguments are the same as those of INITAS,
sets the SLIP system to give a dump (via SLPDMP) if an error
requiring program termination is detected (e.g., exhausting the
available SLIP storage).
F4TRBK
This subroutine should be used as an error exit. A function and
subroutine traceback and a SLIP dump may be obtained.
MRK(D)
This function retrieves the MRK field of the doubleword D.
142 SLIP

MTS 8: LISP and SLIP in MTS
June 1976
SETMRK(I,A)
This function sets the mark I in the MRK field of the SLIP cell
whose name is A.
A series of functions, called partial word functions, which obtain parts
of words have been implemented. The values of these functions may be
treated as integer (the normal situation) or double-precision quanti-
ties. In all cases, the value returned is right-justified.
C1(A) and CHR1(A)
These functions are identical and return the contents of the first
character (first byte or 8 bits) of the word A. A may be a
fullword or doubleword quantity.
C2,CHR2,C3,CHR3,C4,CHR4
These are similarly defined.
C5,CHR5,...,C8,CHR8
These are similarly defined except they must have a doubleword
argument.
Q1(A) and QTR1(A)
These functions are identical and return the first (leftmost)
quarter (two bytes or 16 bits or half-word) of A.
Q2,QTR2,Q3,QTR3,Q4,QTR4
These are appropriately defined. A must be a doubleword for
Q3,QTR3,Q4 and QTR4.
H1(A) and HLF1(A)
These functions are identical and return the leftmost word of A.
H2(A) and HLF2(A)
These functions are identical and return the rightmost word of the
(doubleword) quantity A.
For example, consider the number X = 0102030405060708 (in
hexadecimal):
Fullword Doubleword ________ __________
C1(x) is 00000001 0000000000000001
C3(X) is 00000003 0000000000000003
Q3(X) is 00000506 0000000000000506
SLIP 143
Previous Page Next Page