Computing Scienceipnx Edition 8 Release 1.0
ipnx
Menu

Manual · Section 4 of 8

mux and layers

Downloading the window system, sweeping a layer, and running jim.

What mux is

mux is Rob Pike's window system, and it does not run on the computer you think. Typing mux at a shell on the 5620 sends a program down the serial lineinto the terminal, which then executes it. From that moment the terminal is running a window manager of its own, multiplexing several host sessions over the one wire.

This is 1984, and it is still a startling design: the window system is on the display device, the applications are on the host, and the wire between them carries a protocol rather than pixels. X11 arrived at a similar idea from the other direction and needed a great deal more of everything.

Running it

mux
On the 5620 terminal (tty00). The download takes about fifteen seconds.

The screen clears and you get a cursor. The download is roughly fifty kilobytes over an emulated serial line, and fifteen seconds is fast for it — the original took closer to a minute, and getting this one down from a hundred seconds meant finding two separate 9600-baud throttles in series.

Sweeping a layer

Layers are made with the mouse, in the idiom the Blit invented:

  1. Park the cursor near the middle of the screen. The menu appears centred on the pointer, and near an edge it will be clipped and your selection lost. This is the single most common way a first attempt fails.
  2. Press and hold button 3 (right button) to bring up the menu.
  3. Choose New and release.
  4. The cursor becomes a sweep corner — that is your confirmation the sweep is armed. Press button 1 and drag out the rectangle you want.
  5. Release. A shell starts in the new layer.

The same menu holds Reshape, Move, Delete, Top andBottom. Clicking in a layer makes it current.

Then run jim

jim is the editor that runs in the terminal rather than on the host — the ancestor of sam, mouse-driven, with the text held in the 5620's own memory. In a layer, type jim and a file name.

It is worth doing once just to see what it is: a full-screen mouse-driven editor, from 1984, running on a terminal, over a serial line, on a machine with eight megabytes of memory.

Mouse buttons

Everything here assumes three buttons, which the Blit had. On a trackpad, use a two-finger click for button 3 and hold ⌥ and click for button 2, or set the pointer buttons to taste in Settings. Pointer speed is adjustable there too — the 5620 integrates movement from counters rather than being told where the cursor is, so the right speed is a matter of feel.

If the screen stays blank

On the Wide screen preset the window system has to be the build that knows where the wider framebuffer lives. The login profile selects it for you, so plain mux is correct on both presets — but if you invoke the stock binary by an explicit path on a Wide screen, it will download, run, and draw into the address the framebuffer used to occupy. The symptom is a terminal that looks hung with the old text still on it. Switch to Original, or just typemux.

See also the DMD 5620 for the screen presets themselves.