A self-drawing pattern program for the 8K ROM. Enter a slope (0 for horizontal, 1 for 45 degrees up, -1 for 45 degrees down; values between -5 and 5 work best), and the program traces a line from the left edge, bouncing off the sides, top and bottom, until it runs into a corner. Press M to pause and any key to go on; BREAK stops it.
The December 1982 issue corrected line 380 to LET X=X-1. As printed it reads LET X=X+1, so when the line reaches the right edge it keeps going and the program stops with error B at line 830. The download has both versions. With 1K the program runs out of memory (error 4) as the pattern fills the screen; give it more RAM.
Published in Syntax November 1982 (Etching Program).
Source Code
110 LET X=0
120 LET Y=0
130 PLOT X, Y+20
140 INPUT Z
160 LET U = 1
165 LET T = 2
170 LET Y = Y+1
180 LET X = X+1
185 GOSUB 800
220 GOTO 170
260 LET U = 0
265 LET T = 3
270 LET Y = Y-1
280 LET X = X+1
285 GOSUB 800
320 GOTO 270
360 LET U = 3
365 LET T = 0
370 LET Y = Y+1
380 LET X = X+1
385 GOSUB 800
420 GOTO 370
460 LET U = 2
465 LET T = 1
470 LET Y = Y-1
480 LET X = X-1
485 GOSUB 800
520 GOTO 470
800 LET B=20+Z*Y
805 IF INKEY$ = "M" THEN PAUSE 10000
810 IF ABS B > 43 THEN GOTO (460-100*T)
820 IF ABS X = 64 THEN GOTO (460-100*U)
830 UNPLOT X,B
840 PLOT X,B
850 RETURNNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


