10REM *EXALL 20REM Utility to examine all files and directories from current point 30REM (C) John Robinson 1988 40REM Method: Recursive routine that examines current dir and calls 50REM itself for dirs inside current dir 60: 70DIM code &200 80origin=&900 90proc=&FFFF 100processor=&FFFF0000 110file$="ExAll" 120: 130osgbpb=&FFD1 140osfile=&FFDD 150osnewl=&FFE7 160oswrch=&FFEE 170oscli =&FFF7 180: 190FOR pass=4 TO 7 STEP 3 200P%=origin 210O%=code 220[OPT pass 230 240.exall 250LDA #0 260STA indent 270.recursive 280LDA #0 290STA gbpbblock+9 300STA gbpbblock+10 310STA gbpbblock+11 320STA gbpbblock+12 330.exloop 340LDY #proc DIV 256 350LDX #proc MOD 256 360STY gbpbblock+4 370STX gbpbblock+3 380LDY #cat_entry DIV 256 390LDX #cat_entry MOD 256 400STY gbpbblock+2 410STX gbpbblock+1 420LDA #0 430STA gbpbblock+6 440STA gbpbblock+7 450STA gbpbblock+8 460LDA #1 470STA gbpbblock+5 480LDY #gbpbblock DIV 256 490LDX #gbpbblock MOD 256 500LDA #8 510JSR osgbpb 520BCC continue 530RTS 540.continue 550LDX cat_entry 560LDA #&D 570STA cat_entry+1,X 580LDY #osfileblock DIV 256 590LDX #osfileblock MOD 256 600LDA #5 610JSR osfile 620PHA 630LDX indent 640BEQ done_spaces 650LDA #&20 660.print_spaces 670JSR oswrch 680DEX 690BNE print_spaces 700.done_spaces 710PLA 720PHA 730CMP #2 740BNE not_directory 750LDX #0 760.print_dir_string 770LDA directory,X 780JSR oswrch 790INX 800CPX #eo_dir_string-directory 810BCC print_dir_string 820LDX #0 830.print_filename 840LDA cat_entry+1,X 850JSR oswrch 860INX 870CPX cat_entry 880BCC print_filename 890JSR osnewl 900JMP past_info 910.not_directory 920LDA #ASC "N" 930STA dir 940LDA #ASC "F" 950STA dir+1 960LDA #ASC "O" 970STA dir+2 980LDA #ASC " " 990STA cat_entry 1000LDY #info DIV 256 1010LDX #info MOD 256 1020JSR oscli 1030.past_info 1031LDA &FF 1032BPL not_escape 1033BRK 1034EQUB 17 1035EQUS "Escape" 1036EQUB 0 1037.not_escape 1040PLA 1050CMP #2 1060BNE gexloop 1070INC indent 1080INC indent 1090LDA #ASC " " 1100STA cat_entry 1110LDA #ASC "D" 1120STA dir 1130LDA #ASC "I" 1140STA dir+1 1150LDA #ASC "R" 1160STA dir+2 1170LDY #dir DIV 256 1180LDX #dir MOD 256 1190JSR oscli 1200LDA gbpbblock+9 1210PHA 1220JSR recursive 1230PLA 1240STA gbpbblock+9 1250LDY #dirup DIV 256 1260LDX #dirup MOD 256 1270JSR oscli 1280DEC indent 1290DEC indent 1300.gexloop 1310JMP exloop 1320 1330.gbpbblock 1340EQUB 0 1350EQUD 0 1360EQUD 0 1370EQUD 0 1380 1390.osfileblock 1400EQUW cat_entry+1 1410EQUD 0 1420EQUD 0 1430EQUD 0 1440EQUD 0 1450 1460.dirup 1470EQUS "DIR^" 1480EQUB &D 1490 1500.indent 1510EQUB 0 1520 1530.directory 1540EQUS "Directory " 1550.eo_dir_string 1560 1570.info 1580EQUS "I" \ Start of "INFO" 1590.dir 1600EQUS "DIR" 1610.cat_entry 1620EQUS " **********/" 1630 1640] 1650NEXT pass 1660: 1670save$="*SAVE "+file$+" "+STR$~code+" "+STR$~O%+" "+STR$~(exall OR processor)+" "+STR$~(origin OR processor) 1680PRINT ;save$;" ? (Y/N) "; 1690IF (GET OR &20)=ASC "y" THEN PRINT "Yes":OSCLI save$:PRINT "OK" ELSE PRINT "No" 1700: