Source:Adventure Log Maintenance

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program Adventure Log Maintenance

Source

Eamon Utilities I

Date

28 March 1984

Author

John Nelson

License

The use of this item is permitted on the grounds that it's free or in the public domain.

 1  REM    EAMON ADVENTURE LOG
 2  REM        MAINTENANCE
 3  REM  
 4  REM      BY  JOHN NELSON
 5  REM  
 6  REM 
 7  REM  3-28-84 6:30 A.M.
 8  REM 
 10 D$ =  CHR$ (4): TEXT :MG = 7: GOSUB 10000
 100  REM  === MAIN MENU ===
 110  HOME : PRINT  SPC( 10);"EAMON ADVENTURE LOG": PRINT  SPC( 11);"BY JOHN C. NELSON": PRINT 
 120 NR = NA: IF SS THEN NR = NS
 140  PRINT  SPC( 14);NR;" ";TH$(SS);"    ": VTAB 24: PRINT " <CTRL-P>   <CTRL-L>   <CTRL-S> ";
 150  VTAB 6: HTAB 18: INVERSE : PRINT  MID$ ("SCREENPRINT ",PRT * 6 + 1,6): NORMAL 
 200  HTAB 18: IF  NOT LK THEN  PRINT "      "
 250  IF LK THEN  HTAB 18: INVERSE : PRINT "LOCKED": NORMAL 
 300  VTAB 10: PRINT  SPC( MG);"SELECT ACTION:"
 350  PRINT  SPC( MG + 2);"1. PRINT/DISPLAY LIST": PRINT  SPC( MG + 2);"2. INSERT": PRINT  SPC( MG + 2)"3. CHANGE"
 400  PRINT  SPC( MG + 2);"4. ADD RECORD": PRINT  SPC( MG + 2);"5. DELETE": PRINT  SPC( MG + 2);"6. PRINT LABELS"
 450  PRINT  SPC( MG + 2);"7. RE-INITIALIZE FILE": PRINT  SPC( MG + 2);"8. QUIT": PRINT  SPC( MG);"INPUT YOUR CHOICE (1-8):";
 500  GET A$: IF A$ =  CHR$ (16) THEN PRT =  NOT PRT: VTAB 6: HTAB 18: INVERSE : PRINT  MID$ ("SCREENPRINT ",PRT * 6 + 1,6): NORMAL : VTAB 19: HTAB 25 + MG: CALL  - 868: GOTO 500
 550  IF A$ =  CHR$ (12) THEN 50000
 560  IF A$ =  CHR$ (19) THEN 50100
 600  IF A$ < "1" OR A$ > "8" THEN 500
 650  PRINT : ON  VAL (A$) GOTO 1000,8000,3000,4000,6000,7000,9000,5000
 1000  REM   >>>> PRINT LIST
 1010  TEXT : IF SS THEN 1060
 1020  VTAB 10: CALL  - 958: PRINT "ALL OR PRODUCTION ONLY (A OR P):";
 1030  GET AP$: IF AP$ <  > "A" AND AP$ <  > "P" AND AP$ <  >  CHR$ (13) THEN 1030
 1050  PRINT AP$: IF AP$ =  CHR$ (13) THEN 100
 1060  VTAB 10: CALL  - 958: PRINT "SELECT FORMAT OF LIST:": PRINT "   1. ADVENTURE NAMES IN TWO COLUMNS": PRINT "   2. ADVENTURE NAMES AND AUTHORS"
 1070  PRINT "   3. TITLE AND STATUS/ID": PRINT "   4. ALL INFORMATION": PRINT "SELECT A NUMBER (1-4):";
 1080  GET A$: IF A$ < "1" OR A$ > "4" THEN 1080
 1090  PRINT A$:FR =  VAL (A$)
 1100  IF PRT THEN  PRINT D$"PR#1"
 1110 NR = NA: IF SS THEN NR = NS
 1520  HOME :LP = 0: FOR A = 1 TO NR: IF AP$ = "P" AND ST$(A) <  > "PROD" THEN 1550
 1530  ON FR GOSUB 1700,1800,2000,1900
 1540  IF  PEEK (37) > 20 AND  NOT PRT THEN  GOSUB 39000: HOME 
 1550  IF PRT THEN LP = LP + 1: IF LP > 55 THEN  PRINT  CHR$ (12):LP = 0
 1570  NEXT 
 1590  PRINT D$"PR#0": GOSUB 39000: GOTO 100
 1700  REM  === PRINT 2 COL
 1710  IF SS THEN  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". ";SN$(A); TAB( 40);SC$(A): RETURN 
 1730  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". "AN$(A); TAB( 40 -  LEN ( STR$ (A + 1)));A + 1;". ";AN$(A + 1):A = A + 1
 1790  RETURN 
 1800  REM  === PRINT ADV/AUTH
 1810  IF SS THEN  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". ";SN$(A); TAB( 28);SAU$(A): RETURN 
 1830  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". "AN$(A); SPC( 57 -  LEN (AN$(A)) -  LEN (DN$(A)) -  LEN ( STR$ (A)));DN$(A)
 1890  RETURN 
 1900  REM   >>> PRINT LINE
 1910  IF SS THEN  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". ";SID$(A);" ";SN$(A); TAB( 34);SAU$(A): PRINT "    ";SC$(A): PRINT :LP = LP + 1: RETURN 
 1930  PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". "AN$(A); SPC( 57 -  LEN (AN$(A)) -  LEN (DN$(A)) -  LEN ( STR$ (A)));DN$(A); SPC( 10 -  LEN (ST$(A)));ST$(A)
 1990  RETURN 
 2000  REM  === LIST NAME & STAT/ID
 2010  IF PRT THEN  PRINT D$;"PR#1"
 2020  IF SS THEN 2200
 2030 PC = 0: HOME : FOR A = 1 TO NA: PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". ";AN$(A); SPC( 29 -  LEN (AN$(A)));ST$(A): GOSUB 2500: NEXT 
 2050  GOSUB 39000:PC = 0: GOTO 100
 2200 PC = 0: HOME : FOR A = 1 TO NS: PRINT  SPC( 2 -  LEN ( STR$ (A)));A;". ";SN$(A); SPC( 29 -  LEN (SN$(A)));SID$(A): GOSUB 2500: NEXT 
 2250  GOSUB 39000:PC = 0: GOTO 100
 2500 PC = PC + 1: IF PC > 20 THEN  GOSUB 39000:PC = 0: HOME : RETURN 
 2510  RETURN 
 3000  REM  >>>> CHANGE ROUTINE
 3005  IF SS THEN 3500
 3010 CHG = 1: VTAB 8: CALL  - 958: INPUT "ADVENTURE #:";A$: IF  VAL (A$) < 1 OR  VAL (A$) > NADV THEN 100
 3020 A =  VAL (A$): IF A <  >  INT (A) OR A > NA OR A < 1 THEN 3010
 3030  VTAB 8: CALL  - 958: PRINT "ADVENTURE #";A: PRINT "  ";AN$(A): PRINT "  BY ";DN$(A): PRINT "  STATUS:";ST$(A): PRINT 
 3040  PRINT "INPUT FIELD TO CHANGE:": PRINT "  1. ADVENTURE NAME": PRINT "  2. AUTHOR NAME": PRINT "  3. STATUS": PRINT "  4. RETURN": PRINT "INPUT YOUR CHOICE (1-4):";
 3050  GET A$: IF A$ < "1" OR A$ > "4" THEN 3050
 3060  PRINT A$: ON  VAL (A$) GOTO 3070,3080,3090,100
 3070  VTAB 13: CALL  - 958: INPUT "NEW ADVENTURE NAME:";AN$(A): GOTO 3100
 3080  VTAB 13: CALL  - 958: INPUT "NEW AUTHOR NAME:";DN$(A): GOTO 3100
 3090  VTAB 13: CALL  - 958: INPUT "NEW STATUS:";ST$(A): GOTO 3100
 3100  REM  === CHECK DONE
 3110  VTAB 16: CALL  - 958: PRINT "MORE CHANGES FOR THIS RECORD? (Y/N)";
 3120  GET A$: IF A$ <  > "Y" AND A$ <  > "N" AND A$ <  > "y" AND A$ <  > "n" THEN 3120
 3130  PRINT : IF A$ = "Y" OR A$ = "y" THEN 3030
 3140  IF LK THEN A = A + 1: IF A <  = NADV THEN 3030
 3150  GOTO 100
 3500  REM   >>>> CHANGE SPECIAL
 3510 CS = 1: VTAB 8: CALL  - 958: INPUT "SPECIAL #:";A$: IF  VAL (A$) < 1 OR  VAL (A$) > NS THEN 100
 3520 A =  VAL (A$): IF A <  >  INT (A) OR A > NS OR A < 1 THEN 3510
 3530  VTAB 8: CALL  - 958: PRINT "SPECIAL #";A: PRINT "  ";SN$(A): PRINT "  BY ";SAU$(A): PRINT "  ID:";SID$(A): PRINT "  SUBTITLE:";SC$(A): PRINT 
 3540  PRINT "INPUT FIELD TO CHANGE:": PRINT "  1. DISK NAME (MAIN TITLE)": PRINT "  2. AUTHOR NAME": PRINT "  3. DISK ID": PRINT "  4. SUBTITLE": PRINT "  5. RETURN": PRINT "INPUT YOUR CHOICE (1-5):";
 3550  GET A$: IF A$ < "1" OR A$ > "5" THEN 3550
 3560  PRINT A$: ON  VAL (A$) GOTO 3570,3580,3590,3600,100
 3570  VTAB 14: CALL  - 958: INPUT "NEW DISK NAME:";SN$(A): GOTO 3700
 3580  VTAB 14: CALL  - 958: INPUT "NEW AUTHOR NAME:";SAU$(A): GOTO 3700
 3590  VTAB 14: CALL  - 958: INPUT "NEW ID:";SID$(A): GOTO 3700
 3600  VTAB 14: CALL  - 958: INPUT "NEW SUBTITLE:";SC$(A): GOTO 3700
 3700  REM   === CHECK DONE
 3710  VTAB 16: CALL  - 958: PRINT "MORE CHANGES FOR THIS RECORD? (Y/N)";
 3720  GET A$: IF A$ <  > "Y" AND A$ <  > "N" AND A$ <  > "y" AND A$ <  > "n" THEN 3720
 3730  PRINT : IF A$ = "Y" OR A$ = "y" THEN 3530
 3740  IF LK THEN A = A + 1: IF A <  = NS THEN 3530
 3750  GOTO 100
 4000  REM  >>>> ADD RECORD
 4010  HOME : PRINT  SPC( 10);"EAMON ADVENTURE LOG": PRINT  SPC( 14);"ADD A RECORD"
 4020  IF SS THEN AS = 1: GOTO 4500
 4030 ADD = 1
 4100  VTAB 6: CALL  - 958: PRINT  SPC( 14);"ADVENTURE #";NA + 1
 4110  VTAB 8: INPUT "ADVENTURE NAME:";AN$(NA + 1): IF AN$(NA + 1) = "" THEN 100
 4120  VTAB 10: INPUT "AUTHOR'S NAME:";DN$(NA + 1)
 4130  VTAB 12: INPUT "STATUS : ";ST$(NA + 1)
 4140 A = NA + 1:NA = NA + 1: IF LK THEN 4100
 4150  GOTO 100
 4500  VTAB 6: CALL  - 958: PRINT  SPC( 14);"SPECIAL DISK #";NS + 1
 4510  VTAB 8: INPUT "SPECIAL DISK NAME:";SN$(NS + 1): IF SN$(NS + 1) = "" THEN 100
 4520  VTAB 10: INPUT "SPECIAL DISK ID:";SID$(NS + 1)
 4530  VTAB 12: INPUT "SUBTITLE : ";SC$(NS + 1)
 4535  VTAB 14: INPUT "AUTHOR'S NAME:";SAU$(NS + 1)
 4540 S = NS + 1:NS = NS + 1: IF LK THEN 4500
 4550  GOTO 100
 5000  REM  >>>> QUIT ROUTINE
 5010  IF ADD OR CHG OR DLT THEN  GOSUB 15000
 5020  IF AS OR CS OR DS THEN  GOSUB 13000
 5090  PRINT D$"CLOSE": TEXT : HOME : POKE 37,255: END 
 6000  REM   /// DELETE ADVENTURE
 6005  IF SS THEN 6500
 6010  VTAB 8: CALL  - 958: INPUT "ADVENTURE # TO DELETE:";A$:A =  VAL (A$): IF A < 1 OR A > NADV THEN 100
 6020  IF ST$(A) = "PROD" THEN  PRINT "CANNOT DELETE A PRODUCTION ADVENTURE.": GOSUB 39000: GOTO 100
 6030  IF ST$(A) = "TEST" THEN  GOSUB 6200
 6040  PRINT : PRINT "LEAVE OPEN OR COMPRESS LIST?": PRINT "   (ENTER 'O' OR 'C') ... ";
 6050  GET A$: IF A$ <  > "O" AND A$ <  > "C" THEN 6050
 6060  PRINT A$: IF A$ = "O" THEN 6100
 6070  FOR X = A TO NA:AN$(X) = AN$(X + 1):DN$(X) = DN$(X + 1):ST$(X) = ST$(X + 1): NEXT :NA = NA - 1: GOTO 100
 6100  REM  === LEAVE OPEN ===
 6110 AN$(A) = "(OPEN)":ST$(A) = "NONE":DN$(A) = "(NOBODY)": GOTO 100
 6200  REM  === CONFIRM DELETE ===
 6210  VTAB 8: CALL  - 958: PRINT "ARE YOU SURE YOU WANT TO DELETE ": PRINT AN$(A);"?": PRINT "INPUT (Y OR N):";
 6220  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 6220
 6230  PRINT A$: IF A$ = "N" THEN  POP : GOTO 100
 6240 DLT = 1: RETURN 
 6500  REM  === DELETE SPECIAL
 6510  VTAB 8: CALL  - 958: INPUT "SPECIAL DISK # TO DELETE:";A$:A =  VAL (A$): IF A < 1 OR A > NS THEN 100
 6540  PRINT : PRINT "LEAVE OPEN OR COMPRESS LIST?": PRINT "   (ENTER 'O' OR 'C') ... ";
 6550  GET A$: IF A$ <  > "O" AND A$ <  > "C" THEN 6550
 6560  PRINT A$: IF A$ = "O" THEN 6600
 6570  FOR X = A TO NS:SN$(X) = SN$(X + 1):SID$(X) = SID$(X + 1):SAU$(X) = SAU$(X + 1):SC$(X) = SC$(X + 1): NEXT :NS = NS - 1: GOTO 100
 6600  REM   === LEAVE OPEN ===
 6610 SN$(A) = "(OPEN)":SID$(A) = "":SAU$(A) = "(NOBODY)":SC$(A) = "": GOTO 100
 7000  REM  /// PRINT LABELS
 7010  VTAB 10: CALL  - 958: PRINT "SELECT LABELS FOR:": PRINT "  1. ALL ";TH$(SS);" PRINTED": PRINT "  2. RANGE OF ";TH$(SS): PRINT "  3. SINGLE ";TH$(SS); CHR$ (8);" "
 7015  PRINT "  4. CUSTOM LABEL": PRINT "INPUT YOUR CHOICE (1-4):";
 7020  GET A$: IF A$ < "1" OR A$ > "4" THEN 7020
 7025  PRINT A$: VTAB 10: CALL  - 958: INPUT "HOW MANY LABELS (DEFAULT = 1):";N$:N =  VAL (N$): IF N = 0 THEN N = 1
 7030  PRINT 
 7040  IF  VAL (A$) = 1 THEN B = 1:E = NR: GOTO 7500
 7060  ON  VAL (A$) - 1 GOTO 7100,7200,7300
 7100  REM   /// RANGE LABELS
 7110  VTAB 10: CALL  - 958: INPUT "INPUT RANGE AS BB-EE:";A$: FOR X = 1 TO  LEN (A$): IF  MID$ (A$,X,1) = "-" THEN B =  VAL (A$):E =  VAL ( MID$ (A$,X + 1))
 7115  NEXT : IF B < 1 OR B > NR OR B > E THEN 7110
 7120  IF E > NR OR E < 2 OR B = E THEN 7110
 7140  GOTO 7500
 7200  REM  /// SINGLE LABELS
 7210  VTAB 10: CALL  - 958: PRINT TH$(SS); CHR$ (8);: INPUT " #:";A$:A =  VAL (A$): IF A$ = "" OR A < 1 OR A > NR THEN 100
 7215  IF SS THEN  PRINT D$"PR#1": FOR X = 1 TO N: GOSUB 14800: NEXT : PRINT D$"PR#0"
 7220  IF  NOT SS THEN  PRINT D$"PR#1": FOR X = 1 TO N: GOSUB 7800: NEXT : PRINT D$"PR#0"
 7230  IF LK THEN 7210
 7240  GOTO 100
 7300  REM   /// CUST. LABELS
 7310  VTAB 10: CALL  - 958: INPUT "TITLE (1ST LINE):";TI$
 7330  INPUT "MAJOR TITLE:";MT$
 7350  INPUT "SECONDARY TITLE:";ST$
 7360  INPUT "BOTTOM LINE:";SB$
 7380  PRINT D$"PR#1": FOR X = 1 TO N: GOSUB 7900: NEXT : PRINT D$"PR#0": GOTO 100
 7500 SG$ = "G": IF N > 1 THEN  GOSUB 7600
 7510  IF SG$ = "S" THEN 7700
 7520  PRINT D$"PR#1": FOR A = B TO E
 7530  IF  NOT SS THEN  FOR X = 1 TO N: GOSUB 7800: NEXT : NEXT : PRINT D$"PR#0": GOTO 100
 7540  FOR X = 1 TO N: GOSUB 14800: NEXT : NEXT : PRINT D$;"PR#0": GOTO 100
 7600  REM  >> SETS OR GROUP?
 7610  VTAB 10: CALL  - 958: PRINT "AS SET OR GROUPED?": PRINT "INPUT 'S' OR 'G':";
 7620  GET SG$: IF SG$ <  > "S" AND SG$ <  > "G" THEN 7620
 7630  PRINT SG$: RETURN 
 7700  PRINT D$"PR#1": FOR X = 1 TO N: FOR A = B TO E: GOSUB 7800: NEXT : NEXT : PRINT D$"PR#0": GOTO 100
 7800  REM  /// PRINT LABEL
 7810  PRINT  CHR$ (15); SPC( 22);"ADVENTURE #";A: PRINT 
 7820  PRINT  CHR$ (14); CHR$ (27); CHR$ (71); SPC( (29 -  LEN (AN$(A))) / 2);AN$(A)
 7830  PRINT  CHR$ (27); CHR$ (72); CHR$ (20);" "
 7835  GOSUB 30000
 7840  PRINT "COPYRIGHT (C) 19";YY;" BY ";DN$(A);" * DOS 3.3": PRINT  CHR$ (18);""
 7850  RETURN 
 7900  REM   /// SPECIAL LABEL
 7920  PRINT  CHR$ (15); SPC( (60 -  LEN (TI$)) / 2);TI$: PRINT 
 7940  PRINT  CHR$ (14); CHR$ (27); CHR$ (71); SPC( (29 -  LEN (MT$)) / 2);MT$
 7950  PRINT  SPC( (60 -  LEN (ST$)) / 2);ST$
 7970  PRINT  CHR$ (27); CHR$ (72); CHR$ (20);"";
 7980  PRINT  SPC( (60 -  LEN (SB$)) / 2);SB$: PRINT  CHR$ (18);""
 7990  RETURN 
 8000  REM   === INSERT ===
 8010  IF SS THEN 8500
 8020  VTAB 10: CALL  - 958: PRINT "AFTER WHICH ADVENTURE NUMBER (1-";NA;: INPUT ")";AW$: IF  VAL (AW$) < 0 OR  VAL (AW$) > NADV OR  STR$ ( VAL (AW$)) <  > AW$ THEN 100
 8040 AW =  VAL (AW$)
 8110  VTAB 8: INPUT "ADVENTURE NAME:";AN$
 8120  VTAB 10: INPUT "AUTHOR'S NAME:";DN$
 8130  VTAB 12: INPUT "STATUS : ";ST$
 8140  FOR A = NA TO AW + 1 STEP  - 1:AN$(A + 1) = AN$(A):DN$(A + 1) = DN$(A):ST$(A + 1) = ST$(A): NEXT 
 8150 AN$(AW + 1) = AN$:DN$(AW + 1) = DN$:ST$(AW + 1) = ST$:NA = NA + 1: IF LK THEN  GOTO 8020
 8160  GOTO 100
 8500  REM  == INSERT SPECIAL
 8520  VTAB 10: CALL  - 958: PRINT "AFTER WHICH DISK NUMBER (1-";NS;: INPUT ")";AW$: IF  VAL (AW$) < 0 OR  VAL (AW$) > NS OR  STR$ ( VAL (AW$)) <  > AW$ THEN 100
 8540 AW =  VAL (AW$)
 8610  VTAB 8: INPUT "DISK NAME:";SN$
 8615  VTAB 10: INPUT "SUBTITLE:";SC$
 8620  VTAB 12: INPUT "AUTHOR'S NAME:";SA$
 8630  VTAB 14: INPUT "DISK ID: ";SID$
 8640  FOR S = NS TO AW + 1 STEP  - 1:SN$(S + 1) = SN$(S):SA$(S + 1) = SA$(S):SI$(S + 1) = SI$(S):SC$(S + 1) = SC$(S): NEXT 
 8650 SN$(AW + 1) = SN$:SA$(AW + 1) = SA$:SI$(AW + 1) = SI$:SC$(AW + 1) = SC$:NS = NS + 1: IF LK THEN  GOTO 8520
 8660  GOTO 100
 9000  REM   === INIT FILE ===
 9005  POKE 216,0: PRINT D$
 9010  VTAB 8: CALL  - 958: INVERSE : PRINT "CONFIRM";: NORMAL : PRINT " - DO YOU WANT TO RE-INITIAL": PRINT "THE ADVENTURE FILE?": PRINT : PRINT "PRESS 'Y' OR 'N' ";
 9020  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 9020
 9030  PRINT A$: IF A$ = "N" THEN 100
 9040  GOTO 20000
 10000  REM  === TABLE FILE ===
 10010  DIM AN$(100),DN$(100),ST$(100),SN$(20),SID$(20),SAU$(20),SC$(20):TH$(0) = "ADVENTURES":TH$(1) = "SPECIAL DISKS"
 10015  ONERR  GOTO 9000
 10020  HOME : PRINT D$"OPEN EAMON.ADVLOG,L64": PRINT D$"READ EAMON.ADVLOG,R0": INPUT NA
 10030  FOR A = 1 TO NA: PRINT D$"READ EAMON.ADVLOG,R";A: INPUT AN$(A): INPUT DN$(A): INPUT ST$(A): NEXT : PRINT D$;"CLOSE"
 10040  ONERR  GOTO 11000
 10050  PRINT D$;"OPEN EAMON.SPECIAL,L128": PRINT D$;"READ EAMON.SPECIAL,R0": INPUT NS
 10060  FOR S = 1 TO NS: PRINT D$"READ EAMON.SPECIAL,R";S: INPUT SID$(S),SN$(S),SAU$(S),SC$(S): NEXT : PRINT D$;"CLOSE"
 10080  POKE 216,0: RETURN 
 11000  REM  === ERROR ON SPEC ===
 11010  POKE 216,0: PRINT D$
 11020  VTAB 8: CALL  - 958: INVERSE : PRINT "CONFIRM";: NORMAL : PRINT " - DO YOU WANT TO RE-INITIAL": PRINT "THE SPECIAL DISK FILE?": PRINT : PRINT "PRESS 'Y' OR 'N' ";
 11030  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 11030
 11040  PRINT A$: IF A$ = "N" THEN 100
 11050  GOTO 12000
 12000  REM  === BUILD SPEC ===
 12010  RESTORE : READ XX: FOR X = 1 TO XX: READ A$,A$,A$: NEXT : READ NS: FOR X = 1 TO NS: READ SID$(X),SN$(X),SAU$(X),SC$(X): NEXT 
 12040  GOSUB 13000: GOTO 100
 13000  REM   === WRITE FILE ===
 13010  PRINT D$"OPEN EAMON.SPECIAL,L128": PRINT D$"WRITE EAMON.SPECIAL,R0": PRINT NS
 13030  FOR S = 1 TO NS: PRINT D$"WRITE EAMON.SPECIAL,R";S: PRINT SID$(S): PRINT SN$(S): PRINT SAU$(S): PRINT SC$(S): NEXT : PRINT D$;"CLOSE"
 13040  RETURN 
 14000  REM   === SPECIAL LABELS
 14800 TI$ = "SPECIAL EAMON DISKETTE":MT$ = SN$(A):ST$ = SC$(A):SB$ = "COPYRIGHT (C) 1983 BY " + SA$(A): GOSUB 7900: RETURN 
 15000  REM  === WRITE FILE ===
 15010  PRINT D$"OPEN EAMON.ADVLOG,L64": PRINT D$"WRITE EAMON.ADVLOG,R0": PRINT NA
 15030  FOR A = 1 TO NA: PRINT D$"WRITE EAMON.ADVLOG,R";A: PRINT AN$(A): PRINT DN$(A): PRINT ST$(A): NEXT : PRINT D$;"CLOSE"
 15040  RETURN 
 20000  REM  === INIT FILE ===
 20010  RESTORE : READ NA: FOR X = 1 TO NA: READ AN$(X),DN$(X),ST$(X): NEXT 
 20050  GOSUB 15000: GOTO 100
 20100  DATA  63
 20200  DATA   MAIN HALL & BEGINNER CAVE,DON BROWN,PROD,LAIR OF THE MINOTAUR,DON BROWN,PROD,CAVE OF THE MIND,JIM JACOBSON,PROD,ZYPHUR RIVERVENTURE,JIM JACOBSON,PROD
 20300  DATA  CASTLE OF DOOM,DON BROWN,PROD,DEATH STAR,DON BROWN,PROD,DEVIL'S TOMB,JIM JACOBSON,PROD,ABDUCTOR'S QUARTERS,JIM JACOBSON,PROD
 20400  DATA  ASSAULT ON THE CLONEMASTER,JIM JACOBSON,PROD,MAGICAL KINGDOM,DAVID COOK,PROD,TOMB OF MOLINAR,DON BROWN,PROD,QUEST FOR TREZORE,JIM JACOBSON,PROD
 20500  DATA   CAVES OF TREASURE ISLAND,G.GENZ/P.BRAUN,PROD,FURIOSO,WILLIAM DAVIS,PROD,HEROES CASTLE,JOHN NELSON,PROD
 20600  DATA  CAVES OF MONDAMEN,JOHN NELSON,PROD,MERLIN'S CASTLE,RANDALL HERSON,PROD,HOGARTH CASTLE,KEN NESTLE,PROD,DEATH TRAP,JOHN NELSON,PROD
 20700  DATA   THE BLACK DEATH,JOHN NELSON,PROD,QUEST FOR MARRON,JOHN NELSON,PROD,THE SENATOR'S CHAMBERS,JAMES PLAMONDON,PROD,TEMPLE OF NGURCT,J&R PLAMONDON,PROD,BLACK MOUNTAIN,JOHN NELSON,PROD
 20800  DATA  NUCLEAR NIGHTMARE,JOHN NELSON,PROD,ASSAULT ON THE MOLE MAN,JOHN NELSON,PROD,REVENGE OF THE MOLE MAN,JOHN NELSON,PROD,TOWER OF LONDON,F&S SMITH,PROD
 20900  DATA  APPLE ISLAND,DON BROWN,PROD,UNDERGROUND CITY,STEVE ADELSON,PROD,THE GAUNTLET,JOHN NELSON,PROD,HOUSE OF ILL REPUTE,ANONYMOUS,PROD
 21000  DATA  ORB OF POLARIS,JOHN NELSON,PROD
 21100  DATA  DEATH'S GATEWAY,BOB LINDEN,PROD,LAIR OF MUTANTS,EVAN HODSON,PROD,CITADEL OF BLOOD,EVAN HODSON,PROD,QUEST FOR THE HOLY GRAIL,EVAN HODSON,PROD
 21200  DATA  CITY IN THE CLOUDS,EVAN HODSON,PROD,MUSEUM OF UNNATURAL HISTORY,RICK VOLBERDING,PROD,DAEMON'S PLAYGROUND,RICK VOLBERDING,PROD,CAVERNS OF LANST,RICK VOLBERDING,PROD
 21300  DATA  ALTERNATE BEGINNER'S CAVE,RICK VOLBERDING,PROD,PRIESTS OF XIM!,MARTY & ED BAUMAN,PROD,ESCAPE FROM THE ORC LAIR,JAY HINKLEMAN,PROD
 21400  DATA  SWORDQUEST,ROGER PENDER,PROD,LIFEQUEST,DAVID CRAWFORD,PROD,FUTUREQUEST,ROGER PENDER,PROD
 21500  DATA  PICNIC IN PARADISE,JOHN NELSON,PROD,BEHIND THE SEALED DOOR,TIM BERGE,PEND,EAMON BLUFF,DAN FURMANSKI,PEND
 21600  DATA   FEAST OF CARROLL,D&J LILIENKAMP,PEND,CRYSTAL MOUNTAIN,KEN HOFFMAN,PEND,MASTER'S DUNGEON,JEFF SEECK,PEND,LOST ADVENTURE,JEFF SEECK,PEND
 21700  DATA   MANXOME FOE,RAY OLSZEWSKI,PEND,LAND OF DEATH,TIM BERGE,PEND,JUNGLES OF VIETNAM,JEFF SEECK,PEND,SEWERS OF CHICAGO,JEFF SEECK,PEND
 21800  DATA   BLACK CASTLE OF NAGOG,DOUG BURROWS,PEND,DUNGEON OF DOOM,MATHEW MULLIN,PEND,VALKENBURG CASTLE,JEFF WEENER,PEND,MODERN PROBLEMS,BONNIE ANDERSON,PEND
 21900  DATA  CASTLE KOPHINOS,DON DOUMAKES,PEND
 24000  DATA  9
 24100  DATA  DD5,DUNGEON DESIGNER DISKETTE,D.BROWN/J.NELSON,VERSION 5.0
 24110  DATA  DD6,DUNGEON DESIGNER DISKETTE,J.NELSON/D.BROWN,VERSION 6.0
 24120  DATA  T1,TOURNAMENT 1,D.BROWN,CASTLE OF COUNT FUEY
 24130  DATA  T2A,TOURNAMENT 2,D.BROWN,SEARCH FOR THE KEY
 24140  DATA  T2B,TOURNAMENT 2,DON BROWN,THE RESCUE
 24150  DATA  U1,EAMON UTILITIES I,JOHN NELSON,PLAYER'S UTILITIES
 24160  DATA  U2,EAMON UTILITIES II,JOHN NELSON,DESIGNER'S UTILITIES
 24170  DATA   U3,EAMON UTILITIES III,JOHN NELSON,MONSTER BATTLES
 24180  DATA   U4,EAMON UTILITIES IV,JOHN NELSON,CUSTOMIZER TOOLS
 30000  REM  === COPYRIGHT YEARS ===
 30010  IF A < 10 THEN YY = 79: RETURN 
 30020  IF A < 16 THEN YY = 80: RETURN 
 30030  IF A < 24 THEN YY = 81: RETURN 
 30040  IF A = 29 THEN YY = 79: RETURN 
 30050  IF A < 28 THEN YY = 82: RETURN 
 30060  IF A < 45 THEN YY = 83: RETURN 
 30990 YY = 84: RETURN 
 39000  PRINT : PRINT "====== PRESS ANY KEY TO CONTINUE ======";: GET A$: PRINT : RETURN 
 50000 LK =  NOT LK: VTAB 7: HTAB 18: IF  NOT LK THEN  PRINT "      ": VTAB 19: HTAB 25 + MG: CALL  - 868: GOTO 500
 50010  VTAB 7: HTAB 18: INVERSE : PRINT "LOCKED": VTAB 19: HTAB 25 + MG: CALL  - 868: NORMAL : GOTO 500
 50100 SS =  NOT SS: VTAB 4: HTAB 15:NR = NS * SS + NA * ( NOT SS): PRINT NR;" ";TH$(SS);"    ": VTAB 19: HTAB 25 + MG: CALL  - 868: GOTO 500