10 REM // SAVE DATA
20 CLS
25 INPUT"READY TO CLEAR FILES & SETUP DISK, HIT RETURN TO CONTINUE, Q TO QUIT ";A$
26 IF A$<>"" THEN RUN"MENU"
30 INPUT"ENTER NUMBER OF ARTIFACTS (DO NOT INCLUDE DEAD BODIES) ";NA
40 PRINT
50 INPUT"ENTER NUMBER OF MONSTERS (INCLUDE ALL CREATURES EXCEPT YOURSELF) ";NM
60 PRINT
70 INPUT"ENTER NUMBER OF ROOMS ";NR
80 PRINT
90 INPUT"ENTER NAME OF DUNGEON FILE (RETURN FOR 'DUNGEON') ";F$
100 IF F$="" THEN F$="DUNGEON"
110 PRINT
120 INPUT"ENTER NAME OF ADVENTURE (ALSO KNOWN AS ADNAME) ";AD$
130 IF AD$="" THEN 120
140 CLS
150 PRINT:PRINT:PRINT"READY TO SET UP DUNGEON FILES,   HIT RETURN.";:INPUT A$
160 '
170 ON ERROR GOTO 690
180 N$="EAMON.NAM"
190 OPEN "O",#1,N$
200 PRINT#1,AD$
210 PRINT#1,F$
220 CLOSE#1
230 '
240 N$="EAMON.ART"
250 OPEN "O",#1,N$
260 '
270 N$="EAMON.MON"
280 OPEN "O",#2,N$
290 '
300 N$="EAMON.ROM"
310 OPEN "O",#3,N$
320 '
330 PRINT#1,NA+NM
340 FOR I=1 TO NA+NM
350 PRINT#1,",0,0,0,0"
360 NEXT I
370 '
380 PRINT#2,NM
390 FOR I=1 TO NM
400 PRINT#2,",0,0,0,0,0,0,0,0,0,0,0,0"
410 NEXT I
420 '
430 PRINT#3,NR
440 FOR I=1 TO NR
450 PRINT#3,"0,0,0,0,0,0"
460 NEXT I
470 '
480 '
490 CLOSE#1:CLOSE#2:CLOSE#3
500 '
510 OPEN "O",#1,"ROOM.NAM"
520 CLOSE#1
530 KILL "ROOM.NAM"
540 OPEN "R",#1,"ROOM.NAM",32
541 FIELD 1,32 AS F11$
550 FOR I=1 TO NR
560 LSET F11$=""
561 PUT#1,I
570 NEXT I
580 CLOSE#1
590 '
600 '
610 N$="EAMON.DES"
615 DL=NR
620 GOSUB 850
650 CLOSE#1
660 '
670 N$="EAMON.EFF"
690 DL=NA+NM*2
710 GOSUB 850
715 LSET A$=CHR$(30)
716 PUT#1,NA+NM+NM+1
717 CLOSE#1
720 '
730 RUN"MENU"
740 END
750 '
760 '
770 CLS
780 PRINT"ERROR # ";ERR;" AT LINE ";ERL
790 PRINT
800 PRINT"ERROR TRYING TO OPEN FILE ";N$
810 PRINT"MAKE SURE THIS IS A PROPERLY FORMATTED DISK"
820 CLOSE#1:CLOSE#2:CLOSE#3:RESUME 740
830 '
840 '
850 REM /// CREATE RANDOM FILE
860 OPEN "R",#1,N$,255
870 FIELD 1,255 AS A$
880 FOR I=1 TO DL
890 LSET A$="."
900 PUT#1,I
910 NEXT I
950 RETURN
 FILE
860 OPEN "R",#1,N$,255
870 FIELD 1,255 A