Simple, keyboard-driven drawing program.
Gallery
Source Code
5 BORDER 3 6 PAPER 7: INK 0 7 CLS 10 LET x=0: LET y=x 14 LET M$="d": LET p=0: LET bell=p 15 GO SUB 1000 20 IF INKEY$="" THEN GO TO 24 21 IF INKEY$="d" THEN LET M$="d": GO SUB 1000 22 IF INKEY$="e" THEN LET M$="e": GO SUB 1000 23 IF INKEY$="i" OR INKEY$="b" OR INKEY$="g" OR INKEY$="o" THEN GO SUB 2000 24 IF POINT (x,y)=1 THEN LET p=1 25 PLOT x,y 26 PAPER 0: INK 7: PRINT AT 0,0;x;",";y;: PAPER 7: INK 0: PRINT " " 27 IF p=1 THEN GO TO 30 28 PLOT INVERSE 1;x,y: LET p=0 30 IF |(1,2)=0 THEN GO TO 20 31 GO SUB 33 32 GO TO 20 33 IF M$="d" AND |(2,2)=1 THEN GO TO 50 34 IF |(2,2)=1 THEN GO TO 40 35 IF p=1 THEN GO TO 50 50 PLOT INVERSE 1;x,y 65 LET p=0 75 IF bell=1 THEN BEEP .01,60*RND 80 IF |(1,2)=1 OR |(1,2)=5 OR |(1,2)=9 THEN LET y=y+1 90 IF |(1,2)>=8 AND |(1,2)<=10 THEN LET x=x+1 100 IF |(1,2)>=4 AND |(1,2)<=6 THEN LET x=x-1 110 IF |(1,2)=2 OR |(1,2)=6 OR |(1,2)=10 THEN LET y=y-1 169 IF x>247 THEN LET x=0 170 IF y>167 THEN LET y=0 180 IF x<0 THEN LET x=247 190 IF y<0 THEN LET y=167 200 RETURN 1000 BEEP .01,60: BEEP .01,20: INVERSE 1 1010 PRINT AT 0,31;"\d" 1020 PRINT AT 1,31;"\e" 1021 PRINT AT 2,31;"B" 1022 PRINT AT 4,31;"I" 1025 PRINT AT 15,31;"O" 1027 PRINT AT 10,31;"G" 1028 PRINT AT 0,9;"INPUT GRAPHICS OUTPUT" 1030 INVERSE 0 1040 IF M$="d" THEN PRINT AT 0,31; FLASH 1;"D" 1050 IF M$="e" THEN PRINT AT 1,31; FLASH 1;"E" 1055 IF bell=1 THEN PRINT AT 2,31; FLASH 1;"B" 1060 RETURN 2000 LET z$=INKEY$: BEEP .01,60: BEEP .01,20 2010 IF z$="i" THEN GO TO 2050 2020 IF z$="b" THEN GO TO 2500 2030 IF z$="g" THEN GO TO 2600 2040 IF z$="o" THEN GO TO 4000 2045 IF z$="" THEN GO TO 2000 2050 PRINT AT 4,31; FLASH 1;"I" 2060 PRINT INVERSE 1;AT 5,31;"M";AT 6,31;"L";AT 7,31;"C";AT 8,31;"A" 2061 PRINT INVERSE 1;AT 0,9;"MOVE LINE CIRCLE ARC";: PRINT " " 2065 PAUSE 60 2070 IF INKEY$="" THEN GO TO 2070 2075 IF INKEY$="m" THEN GO TO 2100 2080 IF INKEY$="l" THEN GO TO 2200 2085 IF INKEY$="c" THEN GO TO 2300 2090 IF INKEY$="a" THEN GO TO 2400 2095 BEEP .3,-40: GO TO 2070 2100 PRINT FLASH 1;AT 5,31;"M" 2105 BEEP .01,60: BEEP .01,20 2110 INPUT "Move cursor to x=";x 2111 INPUT "Move cursor to y=";y 2120 GO TO 2490 2200 PRINT FLASH 1;AT 6,31;"L" 2204 BEEP .01,60: BEEP .01,20 2205 INPUT "Draw line from x=";xo 2210 INPUT "Draw line from y=";yo 2215 IF M$="e" THEN INVERSE 1 2220 PLOT xo,yo 2230 INPUT "Draw line to x=";xf 2240 INPUT "Draw line to y=";yf 2250 DRAW xf-xo,yf-yo 2260 INVERSE 0 2270 GO TO 2490 2300 PRINT FLASH 1;AT 7,31;"C" 2304 BEEP .01,60: BEEP .01,20 2305 INPUT "Circle x=";xo 2310 INPUT "Circle y=";yo 2320 INPUT "Circle radius=";r 2330 IF M$="e" THEN INVERSE 1 2340 CIRCLE xo,yo,r 2350 INVERSE 0 2360 GO TO 2490 2400 PRINT FLASH 1;AT 8,31;"A" 2401 BEEP .01,60: BEEP .01,20 2405 INPUT "Arc from x=";xo 2410 INPUT "Arc from y=";yo 2420 INPUT "Arc to x=";xf 2430 INPUT "Arc to y=";yf 2440 INPUT "Fraction of circle=";f 2450 IF M$="e" THEN INVERSE 1 2460 PLOT xo,yo 2470 DRAW xf-xo,yf-yo,2*PI/f 2480 INVERSE 0 2490 PRINT INVERSE 1;AT 4,31;"I" 2491 PRINT INVERSE 1;AT 0,9;"INPUT GRAPHICS OUTPUT" 2492 PRINT AT 5,31;" ";AT 6,31;" ";AT 7,31;" ";AT 8,31;" " 2495 RETURN 2500 LET bl=bell 2505 IF bl=1 THEN LET bell=0 2510 IF bl=0 THEN LET bell=1 2520 PRINT INVERSE 1;AT 2,31;"B" 2530 IF bell=1 THEN PRINT FLASH 1;AT 2,31;"B" 2535 FLASH 0 2540 RETURN 2600 PRINT INVERSE 1;AT 11,31;"L";AT 12,31;"C" 2601 PRINT INVERSE 1;AT 0,9;"LINE CIRCLE";: PRINT " " 2605 PRINT FLASH 1;AT 10,31;"G" 2610 IF INKEY$="" THEN GO TO 2610 2620 IF INKEY$="c" THEN GO TO 3000 2630 IF INKEY$<>"l" THEN GO TO 2610 2635 BEEP .01,60: BEEP .01,20 2640 PRINT FLASH 1;AT 11,31;"L" 2650 IF |(2,2)=1 THEN GO TO 2690 2651 IF POINT (x,y)=1 THEN LET p=1 2652 IF M$="d" AND p=1 THEN GO TO 2655 2653 PLOT x,y 2655 PLOT INVERSE 1;x,y 2660 IF |(1,2)=0 THEN GO TO 2650 2661 IF POINT (x,y)=1 THEN LET p=1 2662 PLOT x,y 2663 PAPER 0: INK 7: PRINT AT 0,0;x;",";y;: PAPER 7: INK 0: PRINT " " 2670 GO SUB 35 2680 GO TO 2650 2690 BEEP .01,60: BEEP .01,20: LET xo=x: LET yo=y 2710 PLOT xo,yo 2715 PAUSE 60 2720 IF |(2,2)=1 THEN GO TO 2760 2721 IF POINT (x,y)=1 THEN LET p=1 2722 IF M$="d" AND p=1 THEN GO TO 2727 2725 PLOT x,y 2727 PLOT INVERSE 1;x,y 2730 IF |(1,2)=0 THEN GO TO 2720 2731 IF POINT (x,y)=1 THEN LET p=1 2732 PLOT x,y 2733 PAPER 0: INK 7: PRINT AT 0,0;x;",";y;: PAPER 7: INK 0: PRINT " " 2740 GO SUB 35 2750 GO TO 2720 2760 BEEP .01,60: BEEP .01,20: LET xf=x: LET yf=y 2770 IF M$="e" THEN INVERSE 1: PLOT xo,yo: DRAW xf-xo,yf-yo 2771 IF M$="d" THEN PLOT xo,yo: DRAW xf-xo,yf-yo 2780 INVERSE 1: PRINT AT 10,31;"G" 2785 PRINT AT 0,9;"INPUT GRAPHICS OUTPUT": INVERSE 0 2790 PRINT AT 11,31;" ";AT 12,31;" " 2800 RETURN 3000 BEEP .01,60: BEEP .01,20 3010 PRINT FLASH 1;AT 12,31;"C" 3020 IF |(2,2)=1 THEN GO TO 3100 3025 PAPER 0: INK 7: PRINT AT 0,0;x;",";y;: PAPER 7: INK 0: PRINT " " 3030 IF POINT (x,y)=1 THEN LET p=1: GO TO 3060 3040 PLOT x,y 3045 PAUSE 2 3060 PLOT INVERSE 1;x,y 3080 IF |(1,2)=0 THEN GO TO 3020 3090 GO SUB 35 3095 GO TO 3020 3100 BEEP .01,60: BEEP .01,20: LET xo=x: LET yo=y 3105 PLOT xo,yo 3110 PAUSE 60 3120 IF |(2,2)=1 THEN GO TO 3200 3125 PAPER 0: INK 7: PRINT AT 0,0;x;",";y;: PAPER 7: INK 0: PRINT " " 3130 IF POINT (x,y)=1 THEN LET p=1: GO TO 3160 3140 PLOT x,y 3145 PAUSE 2 3160 PLOT INVERSE 1;x,y 3180 IF |(1,2)=0 THEN GO TO 3120 3190 GO SUB 35 3195 GO TO 3120 3200 BEEP .01,60: BEEP .01,20: LET xf=x: LET yf=y 3210 LET r=SQR ((xf-xo)*(xf-xo)+(yf-yo)*(yf-yo)) 3220 IF r>167-yo OR r>yo OR r>247-xo OR r>xo THEN BEEP .2,-40: GO TO 3120 3230 IF M$="e" THEN INVERSE 1 3240 CIRCLE xo,yo,r 3245 INVERSE 1: PLOT xo,yo 3250 PRINT AT 10,31;"G" 3255 PRINT AT 0,9;"INPUT GRAPHICS OUTPUT": INVERSE 0 3260 PRINT AT 11,31;" ";AT 12,31;" " 3270 RETURN 4000 PRINT FLASH 1;AT 15,31;"O" 4010 INVERSE 1: PRINT AT 16,31;"P";AT 17,31;"N";AT 18,31;"S" 4015 PRINT AT 0,9;"PRINT NEW SAVE";: INVERSE 0: PRINT " " 4020 IF INKEY$="" THEN GO TO 4020 4030 LET o$=INKEY$ 4035 IF o$<>"n" AND o$<>"p" AND o$<>"s" THEN GO TO 4020 4036 BEEP .01,60: BEEP .01,20 4040 IF o$="n" THEN CLS : GO TO 5 4050 PRINT AT 0,0;" " 4060 FOR i=0 TO 21 4070 PRINT AT i,31;" " 4080 NEXT i 4090 IF o$="s" THEN INPUT "Screen name is ?";s$ 4100 IF o$="s" THEN SAVE s$SCREEN$ 4110 IF o$="p" THEN COPY 4120 GO SUB 1000 4130 RETURN 4140 REM "draw" by Owen Christianson, 822 Richmond Ave. Buffalo NY 14222