maux
Star on GitHub Buy me a coffee

The first minute

Watch / firstmin

Filmed on the Apple IIe 80-column display. The same session on the Videx UltraTerm: same keys, same text.

The Videx UltraTerm was an 80-column video card for the Apple IIe, with its own video memory and character generator, real hardware scrolling and more screen modes than the IIe's own 80 columns. This demo runs on either display; the UltraTerm film shows the original Videx UltraTerm, emulated.

A Unix on an Apple IIe, in its first minute. The demo lists the disk, counts the programs in /bin, runs a pipeline through three of them, and runs ps. The BANK column of ps is the whole idea: every process is a 64K RamWorks bank, and the bank number is the process number.

What it types

Everything it types, in order. A line starting with $ is a command at the shell, RET included; keys lines are single keystrokes to a program (RET, ESC and the control keys are named).

$ ls
$ ls /bin | wc -l
$ ls /bin | sort -r | head -5
$ ps

Between steps it presses ^L to clear the screen.

What the captions say

  1. A Unix on an Apple IIe. The boot is done.
  2. No ] prompt and no CALL -151. This is a shell.
  3. The programs live in /bin. How many?
  4. A pipeline: ls, sort and head. The last five names.
  5. Make each program do one thing well.
  6. McIlroy, Bell System Technical Journal, 1978.
  7. And ps. Look at the BANK column.
  8. Every process is a 64K RamWorks bank: BANK is PID.

The gate that proves it

This film is made by site/demos/firstmin.py. Run as assertions, the same file is make check-demo-firstmin, and it runs with the rest of the tests. It requires that ls prints the volume root, in order, as the disk image holds it; that wc -l counts exactly the programs the image holds in /bin; that the pipeline prints the last five names, in order; that ps prints distinct PIDs and distinct banks; and that every process sits in the bank that is its PID. Every expected value is read from the disk image by a2til on the host, never typed into the demo. The checks themselves were tested: with one program removed from /bin the count is off by one and the demo fails at "wc counts exactly the files on the disk"; with sort replaced by a copy of cat it fails at the pipeline; with ps replaced by a copy of echo it fails at "ps prints its header".

Transcript

The screen at every checkpoint the test checks, as the recorder saved it:

== ls (t=9.9 s)
$ ls
BIN            DEMO           LSEG           TENANT.SYSTEM
BYERES         ETC            MAUX.SYSTEM    TMP
DELTEN.SYSTEM  KSEG           PRODOS         USR
$

== ls prints the volume root, in order (t=9.9 s)
$ ls
BIN            DEMO           LSEG           TENANT.SYSTEM
BYERES         ETC            MAUX.SYSTEM    TMP
DELTEN.SYSTEM  KSEG           PRODOS         USR
$

== wc counts exactly the files on the disk (t=19.5 s)
$ ls
BIN            DEMO           LSEG           TENANT.SYSTEM
BYERES         ETC            MAUX.SYSTEM    TMP
DELTEN.SYSTEM  KSEG           PRODOS         USR
$ ls /bin | wc -l
84
$

== the pipeline prints the last five names, in order (t=32.7 s)
$ ls /bin | sort -r | head -5
xargs
wc
vidmode
vi
uuencode
$

== ps (t=45.8 s)
$ ps
 PID S BANK PPID COMMAND
   1 S   01    0 [init]
   2 R   02    0 [idle]
   3 S   03    1 sh
   9 R   09    3 ps
$

== ps prints its header (t=45.8 s)
$ ps
 PID S BANK PPID COMMAND
   1 S   01    0 [init]
   2 R   02    0 [idle]
   3 S   03    1 sh
   9 R   09    3 ps
$

== ps lists several processes (t=45.8 s)
$ ps
 PID S BANK PPID COMMAND
   1 S   01    0 [init]
   2 R   02    0 [idle]
   3 S   03    1 sh
   9 R   09    3 ps
$

== ps prints distinct PIDs and distinct banks (t=45.8 s)
$ ps
 PID S BANK PPID COMMAND
   1 S   01    0 [init]
   2 R   02    0 [idle]
   3 S   03    1 sh
   9 R   09    3 ps
$

== every process sits in the bank that is its PID (t=45.8 s)
$ ps
 PID S BANK PPID COMMAND
   1 S   01    0 [init]
   2 R   02    0 [idle]
   3 S   03    1 sh
   9 R   09    3 ps
$