Click anywhere to regenerate. Each frame draws forward- and back-diagonals at coin-flip odds, filling a grid that was originally 40 columns wide on a Commodore 64 screen.
In 1982, someone (the author is unknown and probably unknowable) typed a single line into a Commodore 64 and hit RUN. The program is its own title: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10. It occupies 33 characters. It does not terminate. What it produces, crawling down a 40-column screen one character at a time, looks unmistakably like a maze: branching corridors, dead ends, passages that almost connect. No maze algorithm is running. The program has no memory of what it has already printed, no data structure for walls, no pathfinding logic of any kind. It picks a diagonal at random (forward slash or backslash, with equal probability) prints it, and loops. The maze is a side effect of constraint: two diagonal characters in a fixed-width grid, at a roughly 50/50 split, happen to connect into labyrinthine corridors more often than they collide into dead ends. The structure emerges from the arithmetic of adjacency, not from any intent.
The Commodore 64 shipped with PETSCII, a character set inherited from Commodore's earlier PET machines and adapted for the C64's 40-column display. PETSCII's upper range (the codes above 160) was given over to block graphics: lines, corners, junction characters, and various fill patterns. CHR$(205) in that set renders as a diagonal line running from upper-left to lower-right; CHR$(206) runs the other way. The expression 205.5 + RND(1) exploits the way BASIC handles character codes: RND(1) returns a value in [0, 1), so the sum falls either in [205.5, 206) (which truncates to 205, or in [206, 206.5)) which truncates to 206. The two characters appear with equal probability, and the semicolon suppresses the newline that BASIC would otherwise insert after each PRINT. The screen fills left to right, wrapping at the column boundary, producing the characteristic woven texture that made the program a fixture of early C64 culture.
// Modern JavaScript equivalent
const SIZE = 22;
ctx.beginPath();
if (Math.random() > 0.5) {
ctx.moveTo(x, y);
ctx.lineTo(x + SIZE, y + SIZE); // forward slash
} else {
ctx.moveTo(x + SIZE, y);
ctx.lineTo(x, y + SIZE); // backslash
}
ctx.stroke();
x += SIZE;
if (x >= W) { x = 0; y += SIZE; }
Nick Montfort and nine co-authors dedicated an entire book to this program. 10 PRINT CHR$(205.5+RND(1)); : GOTO 10, published by MIT Press in 2012, takes the one-liner as a kind of archaeological site, examining it from the angles of platform studies, computer history, aesthetics, and media theory. The book's argument is that the program is a representative object, one in which the constraints of the Commodore 64's PETSCII character set, BASIC's evaluation semantics, and the physical architecture of the C64's VIC-II chip are all legible in the pattern it produces. Montfort is a professor of digital media at MIT whose platform studies work, developed with Ian Bogost, insists that the hardware and software substrate of a program shapes what that program can say. 10 PRINT is the longest demonstration of that argument: a book-length reading of a 33-character text. The full book is freely available at 10print.org, which is itself a statement about software culture.
What the artifact demonstrates, in the browser, is how little the Commodore 64's character-set specificity matters to the effect. The JavaScript version substitutes canvas line-drawing for PETSCII characters, sets the cell size to 22 pixels, and runs at whatever frame rate the browser allows. The maze still appears. This is the deeper point Montfort and his collaborators are circling: the pattern is not an artifact of PETSCII. It is an artifact of binary choice in a grid, and it would look like a maze on any substrate that offers two diagonal options and a fixed tile width. The C64 is the historical occasion, not the cause. The cause is probability and geometry, which make a coin-toss grid resemble a labyrinth in any era, on any machine. The history matters because it tells you who first noticed this, and why, and what cultural infrastructure made it possible to notice. The pattern matters because it raises a harder question: when does randomness start to look like design, and who decides?
10 PRINT
Browser port of the Commodore 64 BASIC one-liner. Random forward- and back-diagonals fill a fixed-width grid, producing emergent maze-like patterns. Click to regenerate.
View artifact → Open gallery sketch →