[Simh] New PDP-1 Lisp stuff
Andru Luvisi
luvisi at andru.sonoma.edu
Mon May 23 21:04:21 EDT 2005
Seen on Lambda The Ultimate, The Computer History Museum is putting
together a History of LISP archive at
http://community.computerhistory.org/scc/projects/LISP/
including a scan of _The Programming Language Lisp : Its Operation and
Applications_ at
http://community.computerhistory.org/scc/projects/LISP/III_LispBook_Apr66.pdf
This is the book that PDP-1 Lisp was typed in from, and has an appendix on
it, including lots of sample code and examples of interfacing with PDP-1
machine code.
In vaguely related and far less exciting news, I've implemented funargs
and written some tests that use them. The extra space at the end of each
top level form seems to be needed.
(rplacd (quote evqlis)
(quote
(expr
(lambda (l e)
(cond ((null l) nil)
(t (cons (list (quote quote) (eval (car l) e))
(evqlis (cdr l) e))))))))
(rplacd (quote dofunarg)
(quote
(expr
(lambda (a e a2 e2)
(eval (cons a (evqlis a2 e2)) e)))))
(rplacd (quote function)
(quote
(fexpr
(lambda (a e)
(prog (sym)
(setq sym (gensym))
(rplacd sym
(list
(quote fexpr)
(list
(quote lambda)
(quote (a2 e2))
(list (quote dofunarg) (list (quote quote) (car a))
(list (quote quote) e)
(quote a2) (quote e2)))))
(return sym))))))
(rplacd
(quote mkadder)
(quote
(expr (lambda (x) (function (lambda (y) (plus x y)))))))
(rplacd
(quote mkadder2)
(quote
(expr (lambda (x) (function addx)))))
(rplacd
(quote addx)
(quote (expr (lambda (y) (plus x y)))))
(rplacd
(quote mkcounter)
(quote (expr (lambda (x) (function (lambda (y) (setq x (plus x 1)) x))))))
(rplacd
(quote mkcounter)
(quote (expr (lambda (x) (function (lambda () (setq x (plus x 1)) x))))))
More information about the Simh
mailing list