webcadr/ system 100

Run

loading the page

Disk: not opened yet

About webcadr

Close

The CADR was the Lisp Machine built at the MIT AI Lab in the late 1970s and 1980s: a microprogrammed computer whose whole operating system, editor, window system and network software were written in Lisp. Its microcode implements a 16-bit macroinstruction set and everything under it, from tagged memory and paging to the Lisp function call.

This page runs System 100.0 with microcode 323, from the 2023 LM-3 release, unmodified: the original boot PROM, the original microcode and the original disk, on a clean-room emulator of the CADR processor that executes one microinstruction at a time, compiled to WebAssembly.

It starts at the Lisp Listener, where you can type Zetalisp, edit in Zmacs and use the window system. A small Chaosnet file server in the page stands in for the site's host MIT-OZ: it tells the machine the time and serves the System 100 source tree under /tree/ and the files you upload under /upload/.

webcadr's source is at github.com/stass/webcadr.

Licences

How it works

Close

The CADR was microcoded. Lisp compiles to macroinstructions, and the processor does not run those directly: its microcode, a lower-level program that the boot loads from the disk into the processor, carries out each of them and implements everything beneath them, from the function call to tagged memory and paging.

webcadr emulates the CADR processor one microinstruction at a time, with its memory, disk, display, keyboard, mouse and Chaosnet interface. The emulator is written in C from the hardware's documents, not from the original code, and compiled to WebAssembly; it runs in a Web Worker beside the page. It runs the original boot PROM and microcode 323 unchanged, and they boot the saved System 100.0 Lisp system from the release disk: nothing of Lisp is reimplemented. Every change to the emulator is checked against usim, an established CADR simulator, and the two must reach the same states, bit for bit.

To run faster, the page runs the microcode compiled to WebAssembly when the page is built, and the emulator runs the words it does not compile. The compiled code must leave exactly the state the emulator would. Add ?tier=0 to the page's address to run the emulator alone.

While the machine runs, the bar under the screen shows how fast it goes against a real CADR: the microinstructions it ran over the last few seconds, divided by the 5.56 million a second of a CADR's nominal 180 ns microcycle; a real CADR's waits made it slower than that, so the figure is a lower bound.

Booting from power-on takes a while, so the page resumes your own saved session, or else starts from a checkpoint of the Listener saved when the page was built. Cold boot does the real boot.

The release disk is downloaded and checked against its digest. The machine's writes go into an overlay, kept in this browser's private storage when the browser allows it, so the downloaded disk never changes. Reset discards the overlay and your saved session; Export downloads the disk as an image file.

A small Chaosnet file server in the page stands in for MIT-OZ, the site's system host that the release expects. It tells the machine the time and serves, read-only, the System 100 source tree under /tree/ and the files you upload under /upload/. Files the machine writes to it reach your computer only as downloads the page asks you about.

The screen is the CADR's 768 by 963 TV frame buffer, one bit a pixel, drawn into a canvas. Your keystrokes and mouse movements go to the emulated Space Cadet keyboard and mouse.

webcadr's source is at github.com/stass/webcadr.

Licences

Demos

Close

Help: things to try

Close

Settings

Close

The screen

: as large as the window allows; at a size between whole device pixels a pixel, drawn larger and reduced smoothly, so every stroke of text has the same weight.

: the most whole device pixels a pixel that fit, every edge hard, though the screen may then not fill the window.

Saving the session

Pause, beside Cold boot, saves the running machine's session in this browser and holds it; Continue, or a key or click on the screen, goes on, and a page closed meanwhile resumes the session when it loads. Hiding the tab saves the session of a machine you have typed into or clicked, and it runs on.

: while the tab is hidden, the machine is also held, and it goes on when the tab is shown. On phones and tablets, which may close a hidden tab, it is on by default and holds at once; elsewhere it is off by default and holds after the tab has been hidden 30 seconds.

Logging in

System 100 opens no file before someone logs in. When the machine starts from the shipped Listener checkpoint with the Chaosnet peer attached, the page types (login 'name) into the Listener once, with the user name below.

Advanced

chooses a disk image file from this computer to boot instead of the release disk.

ends the running machine and boots the chosen image, resuming its own saved session when it has one.

Download from the machine