publisher colophon


While the specific line of code 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 is the focus of this book, and has been treated as canonical, this program is not a simple transcription of some authoritative version. The authors of this book developed this variant of the program in an attempt to represent many of the common features of a BASIC one-liner and to embody aspects of the earliest two variants that we found. Variants of this maze-generating code have appeared in print and other contexts over the course of the Commodore 64’s commercial lifetime and beyond. Some of these variants are addressed in the chapters and remarks; others are listed only here. The following variants of 10 PRINT may differ in length, line numbering, and character codes used, but they are all meant to produce the same output. These are all the variants the authors are aware of as of May 2012, with full bibliographic information for each known appearance of each of them. (After this book first went to press, we learned of an earlier printed variant in the 1981 book Personal Computing on the VIC 20.)


20 PRINT CHR$(205.5 + RND(1));
40 GOTO 20

Commodore, Inc. 1982. Commodore 64 User’s Guide. Wayne, PA and Indianapolis, IN: Commodore Business Machines. Distributed by Howard W. Sams & Co. p. 53.


8 PRINT CHR$(205.5 + RND(8)); : GOTO 8

Krueger, Dan A. 1984. “Trick $93.” “Magic” section, RUN 7 (July): 13–14.

A one-line variant of 10 PRINT (upper left) in the “Magic” section of RUN 7,. July 1984. 10 PRINT CHR$(109+RND(1)*2); : GOTO 10

Montfort, Nick. 2008. “Obfuscated Code.” In Software Studies: A Lexicon, ed. Matthew Fuller. 193–199. Cambridge, MA: MIT Press.

Inacio da Silva, Cicero. 2008. “Software Arte,” slide 17. SlideShare. November 18.

Marino, Mark C. 2010. “The ppg256 Perl Primer: The Poetry of Techne culture.” Emerging Language Practices, no. 1 (Fall).


10 ?"<CLEAR/HOME>"
20 ? CHR$(205.5)+RND(1))
40 GOTO20

Lord Ronin. 2008. “In the Beginning Part 8.” Commodore Free Magazine, September.

Entering and running this program as it appears above will cause it to terminate abnormally with the message “?TYPE MISMATCH ERROR IN 20.” The immediate culprit is the extra right parenthesis that appears after “205.5.” However, even if this superfluous character is removed, the program will not work as intended, because the semicolon that should appear at the end of line 20 is missing. The intention for this program to function like the others listed here is clear from the discussion in the surrounding article, however.


10 PRINT CHR$(109+RND(0)*2);:GOTO 10

Bogost, Ian. 2010. Comment on “Program Your Apple II! Why Not Program Today?” Computing Education Blog. February 20.


10 PRINT CHR$(205.5+RND(1)); : GOTO 10

Montfort, Nick. 2010. “@party: Weaving thread.” Post Position. June 20.

Montfort, Nick, Patsy Baudoin, John Bell, Ian Bogost, Jeremy Douglass, Mary Flanagan, Mark Marino, Michael Mateas, Casey Reas, Warren Sack, Mark Sample, and Noah Vawter. 2010. “Studying Software by Porting and Reimplementation: A BASIC Case.” Presented by Nick Montfort, Jeremy Douglass, and Casey Reas. Critical Code Studies Conference, University of Southern California. July 23.

Driscoll, Kevin. 2010. “Critical Code Studies 2010.” Driscollwiki. July 23.

Reas, Casey. 2010. 10 PRINT CHR$(205.5+RND(1)); : GOTO 10. Twitter. July 25.!/REAS/status/19475597776

Montfort, Nick. 2010. “Colloquium Past, Conference to Come in Mexico.” Post Position. November 17.

Montfort, Nick. 2011. “10 PRINT Talks Galore.” Post Position. January 26.

Rettberg, Jill Walker. 2011. “10 PRINT CHR$(205.5+RND(1)); : GOTO 10.” Flickr, February 9.

Kidd, David. 2011. April 8.

th0ma5w. 2011. “10 PRINT CHR$(205.5+RND(1)); : GOTO 10.” YouTube.

July 23. “As demonstrated by Casey Reas at the Eyeo Festival, June 2011, Minneapolis, Minnesota, a random maze generation program in one line of Commodore 64 Basic.”


1 printchr$(205.5+rnd(1));:goto1
1 ?chr$(205.5+rnd(1));:run

MuppetMan et al. 2010. “Maze Code” discussion thread, Commodore 64 (C64) Forum, August 12–16.


10 print chr$(205.5 + Rnd(1));
20 goto 10

Smith, Adam. 2010. “the infamous c64 maze generator.” Flickr. October 6.


10 PRINT CHR$(205.5+RND(1)) GOTO 10

Fuchs, Martin. 2011. Written Images. Rendered February 9. Book number 182/230, page 161.

This is printed as the title of Casey Reas’s contribution to this volume, seven pages of white, blue, and black images generated with a Processing program that is inspired by 10 PRINT. The semicolon and colon, which are necessary for the program’s proper functioning and its validity as BASIC, were removed in error during editing in this limited-edition book. This title is also presented this way on page 1 of Written Images, in the table of contents.


10 PRINT "(It indicates that here you press Shift and
CLR/Home Keys" I found my 7 key has Home on it -)"
note the " marks at start and end
20 PRINT CHR$(205.5+RND(1))

noknojon. 2011. February 17, 8:01 p.m.

Entering and running this program as it appears above will cause it to terminate abnormally with the message “? SYNTAX ERROR IN 30.” Two changes need to be made for this code to function as intended: a semicolon should be added at the end of line 20 and “PRINT” should be removed from line 30.

In addition, this text indicates that one should hold SHIFT and then press the CLR/HOME key. This causes the screen to be cleared when the program is run and it moves printing of characters to the upper left. If CLR/ HOME is pressed without holding SHIFT, as the 1982 and 2008b variants seem to suggest one should do, the printing of characters will move to the upper left but the display will not be cleared, so the maze will move downward to cover whatever is already on the screen.

Previous Chapter


Next Chapter


Additional Information

Related ISBN
MARC Record
Launched on MUSE
Open Access
Back To Top

This website uses cookies to ensure you get the best experience on our website. Without cookies your experience may not be seamless.