next up previous
Next: 6.2 Tracing Up: 6. RUNNING THE LISP Previous: 6. RUNNING THE LISP

6.1 Preparing a Card Deck

A LISP program consists of several sections called packets. Each packet starts with an Overlord direction card, followed by a set of doublets for evalquote, and ending with the word STOP.

Overlord direction cards control tape movement, restoration of the system memory between packets, and core dumps. A complete listing of Overlord directions is given in Appendix E.

Overlord direction cards are punched in Share symbolic format; the direction starts in column 8, and the comments field starts in column 16. Some Overlord cards will now be described.

TEST: Subsequent doublets are read in until the word STOP is encountered, or until a read error occurs. The doublets are then evaluated and each doublet with ts value is written on the output tape. If an error occurs, a diagnostic will be written and the program will continue with the next doublet. When all doublets have been evaluated, control is returned to Overlord which restores the core memory to what it was before the TEST by reading in a core memory image from the temporary tape.

SET: The doublets are read and interpreted in the same manner as a TEST. However, when all doublets have been evaluated, the core memory is not restored. Instead, the core memory is written out onto the temporary tape (overwriting the previous core image), and becomes the base memory for all remaining packets. Definitions and other memory changes made during a SET will affect all remaining packets.

Several SET'S during a LISP run will set on top of each other.

A SET will not set if it contains an error. The memory will be restored from the temporary tape instead.

SETSET: This direction is like SET, except that it will set even if there is an error.

FIN: End of LISP run.

The reading of doublets is normally terminated by the word STOP. If parentheses do not count out, STOP will appear to be inside an S-expression and will not be recognized as such. To prevent reading from continuing indefinitely, each packet should end with STOP followed by a large number of right parentheses. An unpaired right parenthesis will cause a read error and terminate reading.

A complete card deck for a LISP run might consist of:

        a: LISP loader 
b: ID card (Optional) 
c: Several Packets 
d: FIN card 
e: Two blank cards to prevent card reader from hanging up

The ID card may have any information desired by the computation center. It will be printed at the head of the output.


next up previous
Next: 6.2 Tracing Up: 6. RUNNING THE LISP Previous: 6. RUNNING THE LISP