--- title: "Dice Roll" id: 76406 type: "computer_media" slug: "dice-roll" url: "http://localhost/computer_media/dice-roll/" markdown_url: "http://localhost/computer_media/dice-roll.md" published_at: "2026-11-11T08:03:03+00:00" modified_at: "2026-11-11T08:03:03+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/dice-roll-1.png" excerpt: "A quiet, fair pair of dice for a 1K ZX80." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Robert Masters" slug: "robert-masters" taxonomy: "indiv" url: "http://localhost/indiv/robert-masters/" genre: - name: "Dice" slug: "dice" taxonomy: "genre" url: "http://localhost/type/dice/" media_type: "Program" programmers: - name: "Robert Masters" slug: "robert-masters" taxonomy: "indiv" url: "http://localhost/indiv/robert-masters/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Dice%20Roll%20%281982%29%28Masters%2C%20Robert%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/dice-roll-1.png" - url: "http://localhost/wp-content/uploads/2026/11/dice-roll-2.png" article_media: - id: 19302 title: "Dice Roll" type: "article" url: "http://localhost/article/dice-roll/" media_type_tags: "Dice" license: false --- # Dice Roll A quiet, fair pair of dice for a 1K ZX80. Each press of NEWLINE rolls two dice and draws them one above the other as graphic die faces with the right pattern of pips. Enter any character to stop. Subroutine 700 arranges the pips for each face and subroutine 800 draws the die. SYNTAX printed the graphics as key descriptions (7space shiftQ and so on); the file has the characters themselves. Published in Syntax August 1982 ([Dice Roll](https://timexsinclair.com/article/dice-roll/)). ## Source Code ``` 5 LET A$=" ▌ " 10 LET B$=CHR$(130) 15 LET X$=" ▌" 30 RANDOMISE 40 LET X=RND(6) 50 LET Y=RND(6) 60 LET Z=X 70 GO SUB 700 80 GO SUB 800 90 PRINT 100 LET Z=Y 110 GO SUB 700 120 GO SUB 800 130 INPUT Q$ 135 CLS 140 IF Q$="" THEN GO TO 40 150 STOP 700 LET C$="▒ ▒" 701 LET D$=C$ 702 LET E$=C$ 705 IF Z=1 THEN LET C$=" " 706 IF Z=1 THEN LET E$=C$ 710 IF Z=1 OR Z=3 OR Z=5 THEN LET D$=" ▒ " 720 IF Z=2 OR Z=3 THEN GO SUB 750 730 IF Z=2 OR Z=4 THEN LET D$=" " 740 RETURN 750 LET C$="▒ " 760 LET E$=" ▒" 770 RETURN 800 LET Z$="▄" 805 GO SUB 900 810 PRINT A$;B$ 820 PRINT X$;C$;" ";B$ 830 PRINT A$;B$ 840 PRINT X$;D$;" ";B$ 850 PRINT A$;B$ 860 PRINT X$;E$;" ";B$ 870 PRINT A$;B$ 875 LET Z$=CHR$(131) 880 GO SUB 900 890 RETURN 900 PRINT " "; 910 FOR I=1 TO 10 920 PRINT Z$; 930 NEXT I 940 PRINT 950 RETURN ```