Drawing utility that helps you design electronic circuits. You draw โwireโ lines with keyboard arrows or joystick, and insert device icons by pressing โrโ for resistor, โcโ for capacitor, etc. Printout to a 2040 is provided. Entered from ZX Computing April/May 1983.
Appears on
Capital Area Timex Sinclair User Groupโs Library Tape.
One of a series of library tapes. Programs on these tapes were renamed to a number series. This tape contained programs 20083 to 20120. These tapes were compiled by Tony Willing.
Source Code
1 REM CURCUIT SKETCH ZX Computing April/May 1983 2 BORDER 6: PAPER 0: CLS : INK 7 3 INPUT "initial plot position? x -";x;"y -";y 5 PLOT x,y 6 LET screen=1 8 PRINT AT 0,0;0;" , ";0 10 LET m$="" 15 LET m$=INKEY$ 30 IF m$>="5" AND m$<="8" THEN RESTORE (VAL m$-3)*100 46 IF m$>="5" AND m$<="8" THEN GO TO 60 50 RESTORE 55: FOR z=1 TO 10: READ u$,u: IF u$=m$ THEN GO TO u 52 NEXT z 55 DATA "f",6500,"b",5500,"s",6000,"i",3500,"p",1000,"",10,"c",2000,"r",2500,"t",3000,"d",4000 60 READ a,b 62 IF screen=0 THEN GO TO 64 64 IF x=255 AND m$="8" OR x=0 AND m$="5" OR y=175 AND m$="7" OR y=0 AND m$="6" THEN LET screen=0: GO TO 10 65 LET x=x+a 67 LET y=y+b 68 PRINT OVER 0;AT 0,0;" " 69 PRINT OVER 0;AT 0,0;x;" , ";y 70 DRAW a,b 75 LET screen=1 80 GO TO 10 200 DATA -1,0 300 DATA 0,-1 400 DATA 0,1 500 DATA 1,0 1000 INPUT "X - co-ordinate?";x 1005 INPUT "Y - co-ordinate?";Y 1010 PLOT x,y: GO TO 10 2005 INPUT "h OR v";k$: GO SUB 8000 2007 INPUT "electrolytic? (Y/N)";z$: GO SUB 8000: IF z$="y" THEN GO TO 2100 2010 INPUT "variable? (Y/N)";z$: GO SUB 8000: IF z$="y" THEN GO TO 2050 2015 IF K$="h" THEN DRAW 0,8: DRAW 0,-16: LET x=x+6: LET y=y-8: PLOT x,y: DRAW 0,16: DRAW 0,-8: LET y=y+8: GO TO 10 2020 IF k$="v" THEN DRAW -8,0: DRAW 16,0: LET y=y+6: LET x=x+8: PLOT x,y: DRAW -16,0: DRAW 8,0: LET x=x-8: GO TO 10 2050 IF k$="h" THEN PLOT x-4,y-8: DRAW 14,16: DRAW 0,-2: DRAW 0,2: DRAW -2,0: DRAW 0,2: PLOT x,y: GO TO 2015 2060 IF k$="v" THEN PLOT x-6,y-4: DRAW 16,14: DRAW -2,0: DRAW 2,0: DRAW 0,-2: DRAW 0,2: PLOT x,y: GO TO 2020 2100 INPUT "pos OR neg first?";z$: GO SUB 8000 2110 IF k$="v" AND z$="pos" THEN DRAW 8,0: DRAW -16,0: DRAW 0,3: DRAW 16,0: DRAW 0,-3: PLOT x,y+6: DRAW -8,0: DRAW 16,0: DRAW 0,1: DRAW -16,0: DRAW 0,1: DRAW 16,0: DRAW -8,0: LET y=y+9: GO TO 10 2120 IF k$="v" AND z$="neg" THEN DRAW 8,0: DRAW -16,0: DRAW 0,1: DRAW 16,0: DRAW 0,1: DRAW -16,0: PLOT x,y+6: DRAW -8,0: DRAW 16,0: DRAW 0,3: DRAW -16,0: DRAW 0,-3: DRAW 0,3: DRAW 8,0: LET y=y+9: GO TO 10 2130 IF k$="h" AND z$="pos" THEN DRAW 0,8: DRAW 0,-16: DRAW 3,0: DRAW 0,16: DRAW -3,0: PLOT x+6,y: DRAW 0,8: DRAW 0,-16: DRAW 1,0: DRAW 0,16: DRAW 1,0: DRAW 0,-16: DRAW 0,8: LET x=x+9: GO TO 10 2140 IF k$="h" AND z$="neg" THEN DRAW 0,8: DRAW 0,-16: DRAW 1,0: DRAW 0,16: DRAW 1,0: DRAW 0,-16: PLOT x+6,y: DRAW 0,8: DRAW 0,-16: DRAW 3,0: DRAW 0,16: DRAW -3,0: DRAW 3,0: DRAW 0,-8: LET x=x+9: GO TO 10 2500 INPUT "h OR v";k$: GO SUB 8000 2505 INPUT "variable? (Y/N)";z$: GO SUB 8000 2506 IF z$="y" THEN GO TO 2700 2510 IF k$="h" THEN DRAW 0,4: DRAW 18,0: DRAW 0,-8: DRAW -18,0: DRAW 0,4: DRAW 0,-4: DRAW 18,0: DRAW 0,4: LET x=x+18: GO TO 10 2520 IF k$="v" THEN DRAW 4,0: DRAW 0,18: DRAW -8,0: DRAW 0,-18: DRAW 4,0: DRAW -4,0: DRAW 0,18: DRAW 4,0: LET y=y+18: GO TO 10 2700 IF k$="h" THEN DRAW -3,3: DRAW 3,-3: DRAW -3,-3: DRAW 3,3: DRAW 0,8: DRAW 0,-16: DRAW 6,0: DRAW 0,16: DRAW -6,0: DRAW 3,0: LET y=y+8: LET x=x+3: GO TO 10 2720 IF k$="v" THEN DRAW -3,-3: DRAW 3,3: DRAW 3,-3: DRAW -3,3: DRAW 8,0: DRAW -16,0: DRAW 0,6: DRAW 16,0: DRAW 0,-6: DRAW 0,3: LET x=x+8: LET y=y+3: GO TO 10 3000 INPUT "pnp OR npn";z$: GO SUB 8000 3010 IF z$="npn" THEN CIRCLE x+6,y,8: PLOT x,y: DRAW 2,0: DRAW 0,5: DRAW 0,-10: DRAW 1,0: DRAW 0,10: DRAW 1,0: DRAW 0,-10: DRAW 0,3: DRAW 4,-4: DRAW 0,1: DRAW 0,-1: DRAW -1,0: DRAW 1,0: DRAW -4,4: DRAW 0,2: DRAW 6,4: LET x=x+10: LET y=y+4: GO TO 10 3020 IF z$="pnp" THEN CIRCLE x+6,y,8: PLOT x,y: DRAW 2,0: DRAW 0,5: DRAW 0,-10: DRAW 1,0: DRAW 0,10: DRAW 1,0: DRAW 0,-10: DRAW 0,3: DRAW 4,-4: DRAW -4,4: DRAW 1,0: DRAW -1,0: DRAW 0,-1: DRAW 0,1: DRAW 0,2: DRAW 6,4: LET x=x+10: LET y=y+4: GO TO 10 3500 INPUT "h OR v";z$: GO SUB 8000 3510 IF z$="h" THEN DRAW 2,0: DRAW 7,0,PI: DRAW -2,0: DRAW 7,0,PI: DRAW -2,0: DRAW 7,0,PI: DRAW 2,0: LET x=x+21: GO TO 10 3520 IF z$="v" THEN DRAW 0,2: DRAW 0,7,PI: DRAW 0,-2: DRAW 0,7,PI: DRAW 0,-2: DRAW 0,7,PI: DRAW 0,2: LET y=y+21: GO TO 10 4000 INPUT "h OR v?";z$: GO SUB 8000 4010 INPUT AT 0,0;"cathode (c) OR anode (a) first?";k$: GO SUB 8000 4020 IF z$="h" AND k$="c" THEN DRAW 0,6: DRAW 0,-12: DRAW 0,6: DRAW 7,-6: DRAW 0,12: DRAW -7,-6: DRAW 7,6: DRAW 0,-6: LET x=x+7: GO TO 10 4030 IF z$="h" AND k$="a" THEN DRAW 0,6: DRAW 0,-12: DRAW 7,6: DRAW -7,6: DRAW 7,-6: DRAW 0,6: DRAW 0,-12: DRAW 0,6: LET x=x+7: GO TO 10 4040 IF z$="v" AND k$="c" THEN DRAW 6,0: DRAW -12,0: DRAW 6,0: DRAW -6,7: DRAW 12,0: DRAW -6,-7: DRAW 6,7: DRAW -6,0: LET y=y+7: GO TO 10 4050 IF z$="v" AND k$="a" THEN DRAW 6,0: DRAW -12,0: DRAW 6,7: DRAW 6,-7: DRAW -6,7: DRAW -6,0: DRAW 12,0: DRAW -6,0: LET y=y+7: GO TO 10 5500 INPUT "h OR v";z$: GO SUB 8000 5510 INPUT "pos OR neg first?";k$: GO SUB 8000 5520 IF z$="v" AND k$="pos" THEN DRAW -7,0: DRAW 14,0: PLOT x,y+3: DRAW 3,0: DRAW -6,0: DRAW 3,0: LET y=y+3: GO TO 10 5530 IF z$="v" AND k$="neg" THEN DRAW 3,0: DRAW -6,0: PLOT x,y+3: DRAW -7,0: DRAW 14,0: DRAW -7,0: LET y=y+3: GO TO 10 5540 IF z$="h" AND k$="pos" THEN DRAW 0,7: DRAW 0,-14: PLOT x+3,y: DRAW 0,3: DRAW 0,-6: DRAW 0,3: LET x=x+3: GO TO 10 5550 IF z$="h" AND k$="neg" THEN DRAW 0,3: DRAW 0,-6: PLOT x+3,y: DRAW 0,-7: DRAW 0,14: DRAW 0,-7: LET x=x+3: GO TO 10 6000 INPUT "h OR v";z$: GO SUB 8000 6010 IF z$="h" THEN DRAW 14,7: LET x=x+14: PLOT x,y: GO TO 10 6020 IF z$="v" THEN DRAW 7,14: LET y=y+14: PLOT x,y: GO TO 10 6500 INPUT "h OR v";z$: GO SUB 8000 6510 IF z$="h" THEN DRAW 0,4: DRAW 0,-8: DRAW 1,0: DRAW 0,8: DRAW 1,0: DRAW 0,-8: DRAW 1,0: DRAW 0,8: DRAW 10,0: DRAW 0,-8: DRAW -10,0: DRAW 10,0: DRAW 0,4: LET x=x+13: GO TO 10 6520 IF z$="v" THEN DRAW 4,0: DRAW -8,0: DRAW 0,1: DRAW 8,0: DRAW 0,1: DRAW -8,0: DRAW 0,1: DRAW 8,0: DRAW 0,10: DRAW -8,0: DRAW 0,-10: DRAW 0,10: DRAW 4,0: LET y=y+13: GO TO 10 8000 FOR z=1 TO 7: NEXT z: RETURN 8999 STOP 9901 SAVE "circuit" LINE 1