10 PRINT CHR$(205.5+RND(1)); : GOTO 10
JAEV Notes · October 2026 · 2 min read
10 PRINT CHR$(205.5+RND(1)); : GOTO 10 is a one-line program in the BASIC language of the Commodore 64 home computer. It fills the screen with diagonal lines, each leaning left or right at random, which together look like a maze. The same line is the title of a book about the program by ten authors, published by MIT Press in November 2012.1
What each part does
10is the line number, andGOTO 10jumps back to it. The program repeats forever, until it is interrupted.2RND(1)returns a number between 0 and 1.205.5+RND(1)is therefore between 205.5 and 206.5.CHR$needs a whole number and rounds down, so the result is 205 or 206, each with a probability of one half.2 The program flips a coin without an if.- Characters 205 and 206 in the Commodore 64's character set, PETSCII, are the two diagonals ╲ and ╱.2
PRINT … ;The semicolon makes the next character appear directly after the previous one, with no new line. Without it, the diagonals fall down the left edge in a single column and no maze appears.2
The text screen is 40 characters wide and 25 high, 1,000 characters in all. Characters appear from left to right and top to bottom; when the screen is full, the image scrolls up and printing continues.2
The randomness is not quite random. Called right after the computer is switched on, RND(1) always returns the same first number, 0.185564016, and the same sequence after it. Run first thing, the program draws the same maze on every Commodore 64.2
Where it came from
The first printed version was in the Commodore 64 User's Guide of 1982, as three lines that clear the screen and then loop over PRINT CHR$(205.5 + RND(1));. A one-line version numbered 8 appeared in the magazine RUN in 1984. The exact line in the title is not a transcription of either: the book's authors wrote it to combine the common features of the variants they had found.2
Is it a maze?
Not necessarily. Nothing in the program guarantees a way through. The book includes a further BASIC program, "Maze Walker", that tests whether a given maze has a path from one side to the other.2
The book also traces the pattern back before computers: to the tiles described by Sébastien Truchet in 1704, which Cyril Stanley Smith arranged at random in 1987 (see Truchet tiles), and to Vera Molnár's collage Quatre éléments distribués au hasard (1959).2 One of the authors is the artist Casey Reas.
JAEV's Content works on the same principle, a fixed rule and a source of chance, but takes its chance from a hash of the day's text instead of a random number generator; see a hash as the source of chance.
Sources
- “10 PRINT CHR$(205.5+RND(1)); : GOTO 10”. 10print.org
“a book about a one-line Commodore 64 BASIC program, published in November 2012”; ten authors; royalties to the Electronic Literature Organization. - Nick Montfort, Patsy Baudoin, John Bell, Ian Bogost, Jeremy Douglass, Mark C. Marino, Michael Mateas, Casey Reas, Mark Sample and Noah Vawter, 10 PRINT CHR$(205.5+RND(1)); : GOTO 10. MIT Press, 2012. Free PDF, CC BY-NC-SA 3.0
Chapters “Introduction”, “Regularity”, “The Commodore 64”, “Rem Maze Walker in BASIC” and “Variants of 10 PRINT”: 205.5 + RND(1) truncated to 205 or 206; the semicolon; RND(1) after startup always 0.185564016; 40 × 25 = 1,000 characters; about fifteen seconds to fill the screen; the 1982 User's Guide variant (p. 53) and the 1984 RUN variant; the title line developed by the authors.
- Published
- JAEV Notes, October 2026.
- Use
- Text CC BY 4.0. Free to use and quote with credit to JAEV and a link to this page. Images and quotations by others keep their own terms.
All texts as one file: archive.json - Cite
- JAEV Notes, “10 PRINT CHR$(205.5+RND(1)); : GOTO 10”, jaev.gallery/notes/ten-print-maze/, 2026.
- Corrections
- Additions and corrections are welcome: info@jaev.gallery
- Share
A link from your own site, course page or reading list helps others find it.- Follow
- New notes by RSS · Instagram · Bluesky
JAEV is a daemon taking shape: machines, weights, room, brain.