Post

HN
Hacker News

Exploring PDP-1 Lisp (1960)

Paper Tape Input Because the Lisp function to actually save your newly created code to paper tape is not built in to Basic Lisp, you will first need to load such a function from paper tape. This is also just the regular way of loading any code in Lisp: Mount the alphanumeric tape lisp-defs.pt Set SS5 to down, and straight away the tape gets read in You will see the newly loaded functions come by in the typewriter output: zerop pdef count Set SS5 to up again for typewriter input Press START, then CONTINUE. And make sure the Address switches are indeed set to 4. This is how loading any Lisp code will work. Mount the alphanumeric tape with your functions, set SS5, and see them loaded in. Make a test tape to read in your own functions First, prepare a little test tape. Paste this in a file called test.lisp on your laptop: (rplacd (quote tt) (quote (expr (lambda () (prog () (print (quote hello)) (terpri) (return 5)))))) [space] Make sure the last line of code has a space at the end of it to terminate the function. Now make a paper tape image out of this text file, to read in to the PDP-1: encode_fiodec test.lisp test.pt Mount the alphanumeric tape test.pt Set SS5 to down, the tape gets read in You will see the output: tt hello 5 Set SS5 to up again, to revert to typewriter input Press START, then CONTINUE. And make sure the Address switches are indeed set to 4. Now, to see the program that was just loaded: (print (cdr (quote tt)))