Kilo LISP

A Kilo Byte-Sized LISP System

klisp.tgz (35KB, KL21) | klisp.txt | kl.exe (DOS, 14KB) | kl.com (DOS, 13KB)

Kilo LISP is a small interpreter for purely symbolic LISP. Its source consists of 25K bytes of comprehensible code (20KB C, 5KB LISP) and it runs in 64K bytes of memory. There is also a version for CP/M that is written in T3X and runs in 48K bytes of memory. Despite its small size Kilo LISP offers:

lexical scoping

tail call elimination

macros

quasiquotation

variable-argument functions

constant-space garbage collection

image files

keyboard interrupt handling

The code should compile with any C89 (K&R2/ANSI/ISO) C compiler. It even compiles with Turbo C 2.0 or SubC and with K&R (pre-ANSI) C when using unproto. The CP/M version requires T3X/Z version 13 or later. The interpreter does not use any stdio functions and compiles to a static executable of

29K bytes using SubC on FreeBSD x86-64

31K bytes using T3X/Z on CP/M (Z80)

13K bytes using Turbo C on DOS (8086)

11K bytes using Mark Williams C on Coherent (80286)

512K bytes using GCC on FreeBSD x86-64 (LOL)

Language-wise, Kilo LISP is a LISP-1 using tail recursion to implement iteration. It is a bit like Scheme, but using more LISPy syntax and function names. See the manual for details.

Since some of you have discovered the book: it is a retro-style, overpriced hardcover edition for my own personal amusement only and contains nothing that cannot be found on this page!

contact | privacy