Justine Tunney, 2021. Boot-sector.
SectorLISP is an implementation of LISP that fits in 512 bytes, the size of the boot sector a PC’s BIOS loads when it starts. Its authors describe it as the tiniest true LISP implementation they know of.
It is built around John McCarthy’s meta-circular evaluator from his 1960 paper on LISP: an interpreter for LISP written in LISP itself. The project’s repository includes that evaluator as one expression, with its bugs fixed and its syntactic sugar removed. It needs only eight primitives: CONS, CAR, CDR, QUOTE, ATOM, EQ, LAMBDA and COND. The boot sector is small enough to run it on bare metal.
The repository also has a portable C version. This exhibit runs its “friendly” branch, which Justine Tunney started in November 2021 to make the interpreter easier to use, with contributions from Peter Ferrie and others.
There is no prompt. Type an expression, press Enter, and SectorLISP prints the result.
