A 1K bowling game. Sixteen pins stand in a triangle at the top of the screen and the ball sits at the bottom. Keys 5 and 8 move the ball left and right and 0 bowls it up the screen. Each pin it hits adds one to the score, and a hit can knock the ball sideways into the next pin. The score is printed when the balls run out.
The listing writes every number as CODE of a character to save memory in 1K, and finds pins by PEEKing the display file at the print position. The magazine printed the graphic characters as “(graphic 1)” and so on, meaning graphics-shift on that key, and line 25 as “LGT”; the file has the characters and LET, as they must be typed. A later Bulletins page explained that CODE “W” in lines 45 and 120 equals 60.
Published in Timex Sinclair User July 1983 (16 Pin Bowling).
Source Code
1 LET Q=CODE ""
2 LET S=Q
3 LET C=Q
4 LET M=CODE "(graphic 1)"
5 FOR B=M TO CODE "(graphic 4)"
6 FOR A=M+C TO CODE "(graphic E)"-C
7 PRINT AT B,A;"T"
8 NEXT A
9 LET C=C+M
10 NEXT B
11 LET X=CODE "(graphic 7)"
20 LET F=M
25 LGT Y=CODE "?"
30 LET X=X + (INKEY$="8" AND X < CODE "(graphic T)") - (INKEY$="5" AND X > CODE "")
35 PRINT AT Y,X; " O "
40 IF F > CODE "(graphic E)" THEN GOTO CODE "(inverse -)"
45 IF INKEY$="0" THEN GOSUB CODE "W"
50 GOTO CODE ";"
60 PRINT AT Y,X+M;
65 IF PEEK (PEEK 16398 + VAL "256" * PEEK 16399) = CODE "T" THEN LET Q=Q+M
70 PRINT AT Y,X+M; "O";AT Y,X+M; "(inverse O)";AT Y,X+M; " "
75 LET Y=Y-M
80 IF Y=M-M THEN LET F=F+M
90 IF Q > S AND RND < VAL ".5" THEN LET X=X-M
95 IF Q > S AND RND > VAL ".6" THEN LET X=X+M
100 LET S=Q
110 IF Y=M-M THEN RETURN
120 GOTO CODE "W"
150 PRINT Q
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

