Home » Archimedes archive » Acorn User » AU 1997-05 B.adf » Regulars » StarInfo/Seago/!Styx/ScanDir

StarInfo/Seago/!Styx/ScanDir

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1997-05 B.adf » Regulars
Filename: StarInfo/Seago/!Styx/ScanDir
Read OK:
File size: 02CD bytes
Load address: 0000
Exec address: 0000
File contents
   10SYS&10TOenv$:env$=FNgln(env$," ")
   20DIM name% 256
   30PROCscan_dir(env$)
   40OSCLI("Set Director$Menu HadesDir")
   50END
   60
   70DEF PROCscan_dir(dir$)
   80LOCAL no%,file$
   90no%=0
  100SYS "Director_Menu","Hades HadesDir -temp"
  110SYS "OS_GBPB",9,dir$+CHR$0,name%,1,no%,900,CHR$0 TO ,,,,no%
  120WHILE no%<>-1
  121 file$=FNstring(name%)
  130 SYS "Director_Option",file$
  140 file$=dir$+"."+file$
  150 SYS "Director_Command","%Wipe "+file$+" ~CFR~V|MIfThereIs -not -dir <HadesToday$Dir> ""CDir <HadesToday$Dir>"""
  160 SYS "OS_GBPB",9,dir$+CHR$0,name%,1,no%,900,CHR$0 TO ,,,,no%
  170ENDWHILE
  180SYS "Director_EndMenu"
  190ENDPROC
  200
  210DEF FNgln(a$,b$):WHILEINSTR(a$,b$):a$=MID$(a$,INSTR(a$,b$)+1):ENDWHILE:=a$
  220
  230DEF FNstring(ptr%)
  240LOCAL result$
  250WHILE ?ptr%>31
  260 result$+=CHR$(?ptr%)
  270 ptr%+=1
  280ENDWHILE
  290=result$

"ș&10�env$:env$=�gln(env$," ")
� name% 256
�scan_dir(env$)
(#�("Set Director$Menu HadesDir")
2�
<
F� �scan_dir(dir$)
P� no%,file$
Z	no%=0
d-ș "Director_Menu","Hades HadesDir -temp"
n7ș "OS_GBPB",9,dir$+�0,name%,1,no%,900,�0 � ,,,,no%
xȕ no%<>-1
y file$=�string(name%)
� ș "Director_Option",file$
� file$=dir$+"."+file$
�s ș "Director_Command","%Wipe "+file$+" ~CFR~V|MIfThereIs -not -dir <HadesToday$Dir> ""CDir <HadesToday$Dir>"""
�8 ș "OS_GBPB",9,dir$+�0,name%,1,no%,900,�0 � ,,,,no%
��
�ș "Director_EndMenu"
��
�
�3� �gln(a$,b$):ȕ�a$,b$):a$=�a$,�a$,b$)+1):�:=a$
�
�� �string(ptr%)
�
� result$
�ȕ ?ptr%>31
 result$+=�(?ptr%)
 ptr%+=1
�
"=result$
�
00000000  0d 00 0a 22 c8 99 26 31  30 b8 65 6e 76 24 3a 65  |..."..&10.env$:e|
00000010  6e 76 24 3d a4 67 6c 6e  28 65 6e 76 24 2c 22 20  |nv$=.gln(env$," |
00000020  22 29 0d 00 14 0f de 20  6e 61 6d 65 25 20 32 35  |")..... name% 25|
00000030  36 0d 00 1e 13 f2 73 63  61 6e 5f 64 69 72 28 65  |6.....scan_dir(e|
00000040  6e 76 24 29 0d 00 28 23  ff 28 22 53 65 74 20 44  |nv$)..(#.("Set D|
00000050  69 72 65 63 74 6f 72 24  4d 65 6e 75 20 48 61 64  |irector$Menu Had|
00000060  65 73 44 69 72 22 29 0d  00 32 05 e0 0d 00 3c 04  |esDir")..2....<.|
00000070  0d 00 46 15 dd 20 f2 73  63 61 6e 5f 64 69 72 28  |..F.. .scan_dir(|
00000080  64 69 72 24 29 0d 00 50  0f ea 20 6e 6f 25 2c 66  |dir$)..P.. no%,f|
00000090  69 6c 65 24 0d 00 5a 09  6e 6f 25 3d 30 0d 00 64  |ile$..Z.no%=0..d|
000000a0  2d c8 99 20 22 44 69 72  65 63 74 6f 72 5f 4d 65  |-.. "Director_Me|
000000b0  6e 75 22 2c 22 48 61 64  65 73 20 48 61 64 65 73  |nu","Hades Hades|
000000c0  44 69 72 20 2d 74 65 6d  70 22 0d 00 6e 37 c8 99  |Dir -temp"..n7..|
000000d0  20 22 4f 53 5f 47 42 50  42 22 2c 39 2c 64 69 72  | "OS_GBPB",9,dir|
000000e0  24 2b bd 30 2c 6e 61 6d  65 25 2c 31 2c 6e 6f 25  |$+.0,name%,1,no%|
000000f0  2c 39 30 30 2c bd 30 20  b8 20 2c 2c 2c 2c 6e 6f  |,900,.0 . ,,,,no|
00000100  25 0d 00 78 0e c8 95 20  6e 6f 25 3c 3e 2d 31 0d  |%..x... no%<>-1.|
00000110  00 79 19 20 66 69 6c 65  24 3d a4 73 74 72 69 6e  |.y. file$=.strin|
00000120  67 28 6e 61 6d 65 25 29  0d 00 82 1f 20 c8 99 20  |g(name%).... .. |
00000130  22 44 69 72 65 63 74 6f  72 5f 4f 70 74 69 6f 6e  |"Director_Option|
00000140  22 2c 66 69 6c 65 24 0d  00 8c 19 20 66 69 6c 65  |",file$.... file|
00000150  24 3d 64 69 72 24 2b 22  2e 22 2b 66 69 6c 65 24  |$=dir$+"."+file$|
00000160  0d 00 96 73 20 c8 99 20  22 44 69 72 65 63 74 6f  |...s .. "Directo|
00000170  72 5f 43 6f 6d 6d 61 6e  64 22 2c 22 25 57 69 70  |r_Command","%Wip|
00000180  65 20 22 2b 66 69 6c 65  24 2b 22 20 7e 43 46 52  |e "+file$+" ~CFR|
00000190  7e 56 7c 4d 49 66 54 68  65 72 65 49 73 20 2d 6e  |~V|MIfThereIs -n|
000001a0  6f 74 20 2d 64 69 72 20  3c 48 61 64 65 73 54 6f  |ot -dir <HadesTo|
000001b0  64 61 79 24 44 69 72 3e  20 22 22 43 44 69 72 20  |day$Dir> ""CDir |
000001c0  3c 48 61 64 65 73 54 6f  64 61 79 24 44 69 72 3e  |<HadesToday$Dir>|
000001d0  22 22 22 0d 00 a0 38 20  c8 99 20 22 4f 53 5f 47  |"""...8 .. "OS_G|
000001e0  42 50 42 22 2c 39 2c 64  69 72 24 2b bd 30 2c 6e  |BPB",9,dir$+.0,n|
000001f0  61 6d 65 25 2c 31 2c 6e  6f 25 2c 39 30 30 2c bd  |ame%,1,no%,900,.|
00000200  30 20 b8 20 2c 2c 2c 2c  6e 6f 25 0d 00 aa 05 ce  |0 . ,,,,no%.....|
00000210  0d 00 b4 19 c8 99 20 22  44 69 72 65 63 74 6f 72  |...... "Director|
00000220  5f 45 6e 64 4d 65 6e 75  22 0d 00 be 05 e1 0d 00  |_EndMenu".......|
00000230  c8 04 0d 00 d2 33 dd 20  a4 67 6c 6e 28 61 24 2c  |.....3. .gln(a$,|
00000240  62 24 29 3a c8 95 a7 61  24 2c 62 24 29 3a 61 24  |b$):...a$,b$):a$|
00000250  3d c1 61 24 2c a7 61 24  2c 62 24 29 2b 31 29 3a  |=.a$,.a$,b$)+1):|
00000260  ce 3a 3d 61 24 0d 00 dc  04 0d 00 e6 13 dd 20 a4  |.:=a$......... .|
00000270  73 74 72 69 6e 67 28 70  74 72 25 29 0d 00 f0 0d  |string(ptr%)....|
00000280  ea 20 72 65 73 75 6c 74  24 0d 00 fa 0f c8 95 20  |. result$...... |
00000290  3f 70 74 72 25 3e 33 31  0d 01 04 16 20 72 65 73  |?ptr%>31.... res|
000002a0  75 6c 74 24 2b 3d bd 28  3f 70 74 72 25 29 0d 01  |ult$+=.(?ptr%)..|
000002b0  0e 0c 20 70 74 72 25 2b  3d 31 0d 01 18 05 ce 0d  |.. ptr%+=1......|
000002c0  01 22 0c 3d 72 65 73 75  6c 74 24 0d ff           |.".=result$..|
000002cd