sectorlisp Documentation

repository·main·Indexed 23 days ago

https://github.com/jart/sectorlisp

A minimal LISP implementation designed to bootstrap John McCarthy's meta-circular evaluator on bare metal. It includes a pure LISP version, a portable C reference implementation for POSIX platforms, and a 512-byte i8086 bootable version.

Tokens
423
Snippets
2
Records
3
Agent score
31%

What's inside sectorlisp

  1. Overview of sectorlisp components

    main

    sectorlisp consists of three primary implementations of the LISP meta-circular evaluator:

    1. lisp.lisp: A pure LISP implementation written as a single expression using only essential functions. It is a bug-fixed version of John McCarthy's original evaluator with syntactic sugar removed.
    2. lisp.c: A readable, portable C reference implementation for bootstrapping the evaluator on POSIX platforms.
    3. sectorlisp.S: A 512-byte i8086 implementation that boots directly from BIOS on personal computers.
  2. Run the i8086 implementation in an emulator

    main

    The sectorlisp.bin file is a Master Boot Record (MBR) designed to boot from BIOS. You can run it in an emulator using one of the following methods:

    Using Das Blinkenlights

    Download the latest version of Das Blinkenlights and run it with the -rt flag pointing to sectorlisp.bin.

    Using QEMU

    Run the binary using QEMU with the -fda flag (floppy disk A) and -nographic mode.

    # Das Blinkenlights
    curl --compressed https://justine.lol/blinkenlights/blinkenlights-latest.com >blinkenlights.com
    chmod +x blinkenlights.com
    ./blinkenlights.com -rt sectorlisp.bin
    
    # QEMU
    qemu-system-i386 -nographic -fda sectorlisp.bin
  3. Run the C reference implementation

    main

    To run the portable C implementation of the LISP meta-circular evaluator on a POSIX conforming platform, use make to build the project and then execute the resulting ./lisp binary. This version provides a readline-like interface.

    $ make
    $ ./lisp