DUMPER

10  REM - PROGRAM TO DUMP ALL SOURCE/LISTING FILES TO AN OUTPUT DEVICE
20  FILES *,*
30  DIM A$[255],C$[40],D$[80],F$[10],P$[1],V$[10]
40  PRINT "OUTPUT DEVICE NAME";
50  INPUT V$
60  ASSIGN V$,2,D
70  IF D=0 OR D=8 THEN 100
80  PRINT "OUTPUT ASSIGN ERROR ";D
90  STOP 
100  PRINT "DUMP S(OURCE) OR L(ISTING) FILES";
110  INPUT P$
120  IF P$="S" THEN 150
130  IF P$="L" THEN 150
140  GOTO 100
150  C=L=0
160  C$="CAT-"
170  C$[5]=P$
180  SYSTEM D$,C$
190  IF D$="" THEN 510
200  FOR I=0 TO 2
210  F$=D$[I*24+1,I*24+6]
220  IF F$="      " THEN 510
230  IF D$[I*24+8,I*24+9]#"FL" THEN 470
240  IF F$[1,1]#P$ THEN 470
250  ASSIGN F$,1,F
260  IF F<3 THEN 290
270  PRINT "INPUT ASSIGN ERROR ";F
280  STOP 
290  PRINT "PROCESSING ";F$
300  PRINT ".";
310  IF  END #1 THEN 410
320  READ #1;A$
330  L=L+1
340  IF P$="L" THEN 370
350  PRINT #2;A$
360  GOTO 380
370  PRINT #2;CTL(NUM(A$[1,1]));A$[2];
380  IF L/500#INT(L/500) THEN 310
390  PRINT ".";
400  GOTO 310
410  IF P$="L" THEN 440
420  PRINT #2;CTL(21)
430  GOTO 450
440  PRINT #2;CTL(1)
450  PRINT 
460  C=C+1
470  NEXT I
480  F$[6,6]=CHR$(NUM(F$[6,6])+1)
490  C$[5]=F$
500  GOTO 180
510  PRINT 
520  PRINT C;" FILES PROCESSED"
530  END 
