Arthur Nunes-Harwitt's LISP Implementation in BASIC


In the summer of 1989, I was exploring parsing algorithms. The only computer I had available was an Atari 800 with Atari BASIC. I did write a couple of recursive descent parsers in BASIC, but I longed for a more powerful language. I decided to write my own! What emerged was a dialect of Scheme.

Atari BASIC is not the fastest implementation language. I could have chosen assembly language, but I generally choose portability over speed. In fact, my implementation took six minutes to compute three factorial. That was a bug in Atari BASIC that I never tracked down. I did port it to the PC and the Mac. On a 3Mhz PC running Microsoft's interpreted BASIC, three factorial came back instantly.

I decided to make this code available, when I noticed that Randall Beer had also written a LISP interpreter in BASIC and made it available from his website. Enjoy!


LISP Implementation


Sample Interaction

Initializing Memory...
Initializing Lisp Environment...
LISP in BASIC v1.3 by Arthur Nunes-Harwitt
0](define fact
1]   (lambda (n)
2]      (if (= n 0)
3]          1
3]          (* n (fact (- n 1))))))
FACT
0](fact 5)
120
0]

The content of this page and the content of links from it (with the exception of Randall Beer's page) are copyright © 2009 Arthur Nunes-Harwitt. All rights reserved.