Apple Color Plotter: AppleSoft BASIC Chart Maker II (2 of 3)

This is the Applesoft BASIC source for "Chart Maker II", a demonstration program for the Apple Color Plotter. It provides an easy way to create charts and signs with the plotter. Just startup Applesoft, EXEC this file, and save the program to disk.

Note: This is Part 2 of 3 Parts, all 3 parts must be combined together to complete the program.
1276 IF CM > 47 AND CM < 58 THEN X9 = 2:X8 = VAL ( CHR$(CM)):CM = 69:GOSUB 6000: GOTO 1200
1299 PRINT CHR$(7);: GOTO 1220
2000 GOSUB 72:M$ = "Save a Chart Specification": GOSUB 357
2100 PV = 20:M$ = "Name to Save Chart : ": GOSUB 350
2110 PV = 20:PH = 54:SL = 13: GOSUB 101:IF A$ = CHR$(27) THEN GOSUB 73:RETURN
2120 NAME$ = "C." + B$
2130 ONERR GOTO 2400
2135 PRINT
2140 PRINT D$;"DELETE";NAME$
2200 ONERR GOTO 2300
2205 PRINT D$;"OPEN ";NAME$
2206 PRINT D$;"WRITE ";NAME$
2210 FOR I = 1 TO 10
2220 PRINT TXT$(I): PRINT CENTER$(I): PRINT DENT(I): PRINT SIZE(I):
PRINT BOLD$(I): PRINT COL(I): PRINT SL$(I)
2230 NEXT
2240 PRINT D$;"CLOSE"
2250 GOSUB 73: RETURN
2300 CALL 768: POKE 216,0: ONERR GOTO 97
2310 GOSUB 73: PRINT CHR$(7);
2315 PRINT D$;"CLOSE"
2320 M$="There is no room on the disk, so you'll have to ":PV=18:GOSUB 350
2330 M$ = "delete some files or use a different disk":PV = 20: GOSUB 350
2340 M$ = "Press Any Key to Continue":PV = 22: GOSUB 350
2350 GOSUB 400
2360 ONERR GOTO 2380
2370 PRINT D$;"DELETE ";NAME$
2375 CALL - 3288
2380 GOTO 2250
2400 CALL 768: POKE 216,0
2410 CALL - 3288: GOTO 2200
3000 GOSUB 72:M$ = "Load a Chart Specification": GOSUB 357
3100 PV = 20:M$ = "Name of Chart to Load : ":PH = 10: GOSUB 352
3110 PV=20:PH=40:SL=13: GOSUB 101:IF A$ = CHR$(27) THEN GOSUB 73: RETURN
3120 NAME$ = "C." + B$
3125 PV = 21:PH = 20: GOSUB 99
3126 PV = 21:PH = 20: GOSUB 99: PRINT " "
3130 ONERR GOTO 3300
3200 PRINT D$;"OPEN ";NAME$
3201 PRINT D$;"READ ";NAME$
3202 PV = 24:PH = 80: GOSUB 99
3210 FOR I = 1 TO 10
6560 IF B$ = "Y" OR B$ = "y" THEN SL$ = "Y": GOTO 6600
6570 IF B$ = "N" OR B$ = "n" THEN SL$ = "N": GOTO 6600
6580 GOTO 6550
6600 IF CENTER$ = "Y" THEN DENT = 0: GOTO 6640
6605 PV=20:PH=75:SL=2:LL=0:UL=15:GOSUB 201:IF A$=CHR$(27) THEN GOTO 6990
6610 ON X9 GOTO 6620,6630
6620 GOSUB 369: GOTO 6600
6630 DENT = X8
6640 IF SIZE = 1 THEN SL = 40: GOTO 6650
6641 IF SIZE = 2 THEN SL = 30: GOTO 6650
6642 IF SIZE = 3 THEN SL = 20: GOTO 6650
6650 SL = SL - DENT
6700 PV=22:PH=12:B$=TXT$(N):GOSUB 101: IF A$ = CHR$(27) THEN GOTO 6990
6710 TXT$ = B$
6750 TXT$(N) = TXT$
6751 COL(N) = COL
6752 SIZE(N) = SIZE
6753 DENT(N) = DENT
6754 CENTER$(N) = CENTER$
6755 BOLD$(N) = BOLD$
6760 SL$(N) = SL$
6800 POKE 32,5: POKE 33,40: POKE 34,N + 2: POKE 35,N + 2: HOME : TEXT
6810 I = N: GOSUB 7010
6990 GOSUB 73: RETURN
6995 GOSUB 73: RETURN
7000 GOSUB 71: GOSUB 7200
7005 FOR I = 1 TO 10: GOSUB 7010: NEXT : RETURN
7010 PV = I + 3
7020 PH = 3: GOSUB 99: PRINT I;
7030 PH = 7:M$ = "........................................":GOSUB 352:M$ = TXT$(I)
7045 IF CENTER$(I) = "Y" THEN PH = 27 - ( LEN (M$) / 2)
7046 IF DENT(I) > 0 THEN PH = PH + DENT(I)
7050 GOSUB 352
7055 IF SIZE(I) > 0 THEN M$ = STR$ (SIZE(I)):PH = 49: GOSUB 352
7058 REM*** IF TXT$(I) = "" THEN RETURN
7060 IF COL(I) > 0 THEN M$ = STR$ (COL(I)):PH = 54: GOSUB 352
7070 M$ = CENTER$(I):PH = 60: GOSUB 7150
7080 IF DENT(I) > 0 THEN M$ = STR$ (DENT(I)):PH = 77: GOSUB 352
7090 IF DENT(I) = 0 THEN M$ = " ":PH = 77: GOSUB 352
7100 M$ = BOLD$(I):PH = 65: GOSUB 7150
7105 M$ = SL$(I):PH = 71: GOSUB 7150
7110 RETURN
7150 IF M$ = "Y" THEN M$ = "*": GOSUB 352: NORMAL
7155 IF M$ = "N" THEN M$ = " ": GOSUB 352: NORMAL
7156 RETURN
7200 PV = 2:PH = 3:M$ = "Line": GOSUB 352
7205 PH = 20:M$ = "Text to be Drawn": GOSUB 352
7210 PH = 52:M$ = "Color": GOSUB 352
7220 PH = 58:M$ = "Cntr": GOSUB 352
7230 PH = 74:M$ = "Indnt": GOSUB 352
7240 PH = 47:M$ = "Size": GOSUB 352
7250 PH = 63:M$ = "Bold": GOSUB 352
7260 PH = 69:M$ = "Slnt": GOSUB 352
7299 RETURN
7300 FOR I = 1 TO 10
7310 TXT$(I) = "":CENTER$(I) = "N":DENT(I) = 0:SIZE(I) = 0:BOLD$(I) = "N":COL(I) = 0:SL$(I) = "N"
7320 NEXT : RETURN
8000 GOSUB 72:M$ = "Clear out the 'Old Chart' and Start a New One":GOSUB 357
8010 PV=23:GOSUB 73:M$="Are You Sure, (Y or N)":PV = 20:PH = 28: GOSUB 352
8020 GOSUB 400: IF CM = 27 THEN GOTO 8599
8030 IF CM = 89 THEN GOSUB 7300: GOSUB 7000: RETURN
8031 IF CM = 78 THEN GOTO 8599
8035 PRINT CHR$(7);: GOTO 8020
8099 GOSUB 73: RETURN
8500 GOSUB 72:M$ = "Clear A Line": GOSUB 357
8501 M$ = "Line to Clear (1-10) : ":PV = 18:PH = 29: GOSUB 352
8502 PV=18:PH=50:SL=2:LL=1:UL=10:GOSUB 201:IF A$=CHR$(27) THEN GOTO 8599
8503 ON X9 GOTO 8504,8505
8504 GOSUB 369: GOTO 8502
8505 I = X8
8510 M$ = "Are You Sure, (Y or N)":PV = 20:PH = 28: GOSUB 352
8520 GOSUB 400: IF CM = 27 THEN GOTO 8599
8530 IF CM = 89 THEN GOTO 8540
8531 IF CM = 78 THEN GOTO 8599
8535 PRINT CHR$(7);: GOTO 8520
8540 TXT$(I)="":CENTER$(I) ="":DENT(I)=0:SIZE(I)=0:BOLD$(I)="":COL(I)=0:SL$(I) = ""
8550 POKE 32,6: POKE 33,73: POKE 34,I + 2: POKE 35,I + 2:HOME : TEXT
8555 GOSUB 7010
8599 GOSUB 73: RETURN
9000 GOSUB 9001: GOTO 9002
9001 M$="Draw Chart on Device on Card in Slot '" + PLR$ + "'":PV = 15: GOSUB 72: GOSUB 350: RETURN
9002 PV=19:M$="Name of Chart":GOSUB 350:PV=21:M$="Do You Want a Border on the Chart ? (Y or N) :":GOSUB 350
9003 PV=19:PH=50:SL=8:GOSUB 101:IF A$=CHR$(27) THEN GOSUB 73: RETURN
9004 CHART$ = B$
9007 PV=21:PH=64:SL=1:GOSUB 101:IF A$=CHR$(27) THEN GOSUB 73: RETURN
9008 IF B$ = "Y" OR B$ = "y" THEN BDR$ = "Y": GOTO 9012
9009 IF B$ = "N" OR B$ = "n" THEN BDR$ = "N": GOTO 9012
9010 GOTO 9007
9012 GOSUB 50000: IF CM = 27 THEN GOSUB 73: RETURN
9014 PRINT CHR$(21): HOME
Published Date: Feb 20, 2012