Home » CEEFAX disks » telesoftware12.adl » 17-02-89/CDinfo

17-02-89/CDinfo

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 » CEEFAX disks » telesoftware12.adl
Filename: 17-02-89/CDinfo
Read OK:
File size: 0FBE bytes
Load address: 0000
Exec address: FFFFFFFF
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
Reading Disc Catalogues              Rob Anderson. Nov. '87


 Introduction. 

 There are many occasions when it is useful to have the 
catalogue of a disc available from within a BASIC program, 
so that files may be selected easily under complete control 
of a system. The program accompanying this article uses 
LEGAL operating system calls to obtain the currently active 
drive and disc type, load in the relevant catalogue, and 
then provide an easy way of selecting the required filename 
by use of a cursor to point at the various names. 

 This is performed using three short subroutines that 
may be incorporated into your own programs, and are DFS, 
ADFS, BBC, MASTER & 6502 2nd processor compatible. Note that 
when used with the ADFS (the subroutines automatically sense 
if the ADFS is in use), selecting a directory will result in 
that directory being entered and then the new catalogue 
being displayed. Therefore the routine could also be used as 
a simple "front end" to your ADFS discs, enabling easy 
access to nested directories. 


 Using The Program. 

 As the program stands, a catalogue of the currently 
active disc is displayed and, by using the cursor keys, the 
relevant filename can be selected by pressing the RETURN 
key. The program then simply prints out the name that was 
selected. Note that if the ADFS is active, all directories 
are shown in yellow, and selecting one of them results in 
that directory being entered from which further selections 
can be made. 


 The Subroutines. 

 DEFFNselect(T$) - This function takes a string as a parameter 
which acts as the title that is to be displayed while input 
of the required filename is being made. The value returned 
by the function is also a string which represents the 
filename that was selected. If in DFS, the filename will be 
preceded with its directory and a dot, whereas if ADFS is 
active, just the filename is returned (since the directory 
in which this file is contained has already been entered by 
the routine, it is pointless passing it back). If an error 
occurs, then the string "ErrorErrorError" will be returned , 
which is over ten characters and can not therefore be 
mistaken as a filename. 

 This function works by firstly obtaining the currently 
active filing system using the operating system (O.S.) 
routine "OSARGS" at &FFDA with A=0, Y=0. Using this result, 
either the "getADFScat" or "getDFScat" function is called 

screen in three columns (thus enabling up to 47 filenames to 
be shown at once), and a cursor activated which enables easy 
selection of any entry in the catalogue. The selection so 
made is returned as the result of the function. 


 DEFFNgetDFScat  - The currently active drive is read first by 
using the O.S. routine "OSGBPB" at &FFD1 with A=6. The first 
two sectors of track 0 are then read in using "OSWORD" at 
&FFF1 with A=&7F, thus obtaining a copy of the catalogue 
sectors in memory. This memory is then decoded to obtain the 
filenames which are then entered into the array "name$()". 
The number of filenames read is returned as the value of the 
function. 


 DEFFNgetADFScat - This function has exactly the same task as 
the previous one, but for the ADFS. The filenames of the 
current directory are read in using O.S. call "OSGBPB" at 
&FFD1 with A=8. The routine then checks each filename to see 
if it is a file or directory (a note is made by placing 
either 1 or 2 in the "dir" array respectively), by using 
"OSFILE" at &FFDD with A=5. 


 Placing The Subroutines In Your Own Programs. 

 At the beginning of your program, workspace must be set 
aside for the routines by entering 
  
DIM param% 18,data% 517,name$(46),dir%(46) 

 The function definition "select" must then be placed 
somewhere within your program, along with the functions 
"getDFScat" and "getADFScat". Note that if your program will 
never use either the DFS or ADFS, then "getDFScat" or 
"getADFScat" can be left out respectively. 


                                       Rob Anderson. Nov.'87 
00000000  52 65 61 64 69 6e 67 20  44 69 73 63 20 43 61 74  |Reading Disc Cat|
00000010  61 6c 6f 67 75 65 73 20  20 20 20 20 20 20 20 20  |alogues         |
00000020  20 20 20 20 20 52 6f 62  20 41 6e 64 65 72 73 6f  |     Rob Anderso|
00000030  6e 2e 20 4e 6f 76 2e 20  27 38 37 0d 0d 0d 20 49  |n. Nov. '87... I|
00000040  6e 74 72 6f 64 75 63 74  69 6f 6e 2e 20 0d 0d 20  |ntroduction. .. |
00000050  54 68 65 72 65 20 61 72  65 20 6d 61 6e 79 20 6f  |There are many o|
00000060  63 63 61 73 69 6f 6e 73  20 77 68 65 6e 20 69 74  |ccasions when it|
00000070  20 69 73 20 75 73 65 66  75 6c 20 74 6f 20 68 61  | is useful to ha|
00000080  76 65 20 74 68 65 20 0d  63 61 74 61 6c 6f 67 75  |ve the .catalogu|
00000090  65 20 6f 66 20 61 20 64  69 73 63 20 61 76 61 69  |e of a disc avai|
000000a0  6c 61 62 6c 65 20 66 72  6f 6d 20 77 69 74 68 69  |lable from withi|
000000b0  6e 20 61 20 42 41 53 49  43 20 70 72 6f 67 72 61  |n a BASIC progra|
000000c0  6d 2c 20 0d 73 6f 20 74  68 61 74 20 66 69 6c 65  |m, .so that file|
000000d0  73 20 6d 61 79 20 62 65  20 73 65 6c 65 63 74 65  |s may be selecte|
000000e0  64 20 65 61 73 69 6c 79  20 75 6e 64 65 72 20 63  |d easily under c|
000000f0  6f 6d 70 6c 65 74 65 20  63 6f 6e 74 72 6f 6c 20  |omplete control |
00000100  0d 6f 66 20 61 20 73 79  73 74 65 6d 2e 20 54 68  |.of a system. Th|
00000110  65 20 70 72 6f 67 72 61  6d 20 61 63 63 6f 6d 70  |e program accomp|
00000120  61 6e 79 69 6e 67 20 74  68 69 73 20 61 72 74 69  |anying this arti|
00000130  63 6c 65 20 75 73 65 73  20 0d 4c 45 47 41 4c 20  |cle uses .LEGAL |
00000140  6f 70 65 72 61 74 69 6e  67 20 73 79 73 74 65 6d  |operating system|
00000150  20 63 61 6c 6c 73 20 74  6f 20 6f 62 74 61 69 6e  | calls to obtain|
00000160  20 74 68 65 20 63 75 72  72 65 6e 74 6c 79 20 61  | the currently a|
00000170  63 74 69 76 65 20 0d 64  72 69 76 65 20 61 6e 64  |ctive .drive and|
00000180  20 64 69 73 63 20 74 79  70 65 2c 20 6c 6f 61 64  | disc type, load|
00000190  20 69 6e 20 74 68 65 20  72 65 6c 65 76 61 6e 74  | in the relevant|
000001a0  20 63 61 74 61 6c 6f 67  75 65 2c 20 61 6e 64 20  | catalogue, and |
000001b0  0d 74 68 65 6e 20 70 72  6f 76 69 64 65 20 61 6e  |.then provide an|
000001c0  20 65 61 73 79 20 77 61  79 20 6f 66 20 73 65 6c  | easy way of sel|
000001d0  65 63 74 69 6e 67 20 74  68 65 20 72 65 71 75 69  |ecting the requi|
000001e0  72 65 64 20 66 69 6c 65  6e 61 6d 65 20 0d 62 79  |red filename .by|
000001f0  20 75 73 65 20 6f 66 20  61 20 63 75 72 73 6f 72  | use of a cursor|
00000200  20 74 6f 20 70 6f 69 6e  74 20 61 74 20 74 68 65  | to point at the|
00000210  20 76 61 72 69 6f 75 73  20 6e 61 6d 65 73 2e 20  | various names. |
00000220  0d 0d 20 54 68 69 73 20  69 73 20 70 65 72 66 6f  |.. This is perfo|
00000230  72 6d 65 64 20 75 73 69  6e 67 20 74 68 72 65 65  |rmed using three|
00000240  20 73 68 6f 72 74 20 73  75 62 72 6f 75 74 69 6e  | short subroutin|
00000250  65 73 20 74 68 61 74 20  0d 6d 61 79 20 62 65 20  |es that .may be |
00000260  69 6e 63 6f 72 70 6f 72  61 74 65 64 20 69 6e 74  |incorporated int|
00000270  6f 20 79 6f 75 72 20 6f  77 6e 20 70 72 6f 67 72  |o your own progr|
00000280  61 6d 73 2c 20 61 6e 64  20 61 72 65 20 44 46 53  |ams, and are DFS|
00000290  2c 20 0d 41 44 46 53 2c  20 42 42 43 2c 20 4d 41  |, .ADFS, BBC, MA|
000002a0  53 54 45 52 20 26 20 36  35 30 32 20 32 6e 64 20  |STER & 6502 2nd |
000002b0  70 72 6f 63 65 73 73 6f  72 20 63 6f 6d 70 61 74  |processor compat|
000002c0  69 62 6c 65 2e 20 4e 6f  74 65 20 74 68 61 74 20  |ible. Note that |
000002d0  0d 77 68 65 6e 20 75 73  65 64 20 77 69 74 68 20  |.when used with |
000002e0  74 68 65 20 41 44 46 53  20 28 74 68 65 20 73 75  |the ADFS (the su|
000002f0  62 72 6f 75 74 69 6e 65  73 20 61 75 74 6f 6d 61  |broutines automa|
00000300  74 69 63 61 6c 6c 79 20  73 65 6e 73 65 20 0d 69  |tically sense .i|
00000310  66 20 74 68 65 20 41 44  46 53 20 69 73 20 69 6e  |f the ADFS is in|
00000320  20 75 73 65 29 2c 20 73  65 6c 65 63 74 69 6e 67  | use), selecting|
00000330  20 61 20 64 69 72 65 63  74 6f 72 79 20 77 69 6c  | a directory wil|
00000340  6c 20 72 65 73 75 6c 74  20 69 6e 20 0d 74 68 61  |l result in .tha|
00000350  74 20 64 69 72 65 63 74  6f 72 79 20 62 65 69 6e  |t directory bein|
00000360  67 20 65 6e 74 65 72 65  64 20 61 6e 64 20 74 68  |g entered and th|
00000370  65 6e 20 74 68 65 20 6e  65 77 20 63 61 74 61 6c  |en the new catal|
00000380  6f 67 75 65 20 0d 62 65  69 6e 67 20 64 69 73 70  |ogue .being disp|
00000390  6c 61 79 65 64 2e 20 54  68 65 72 65 66 6f 72 65  |layed. Therefore|
000003a0  20 74 68 65 20 72 6f 75  74 69 6e 65 20 63 6f 75  | the routine cou|
000003b0  6c 64 20 61 6c 73 6f 20  62 65 20 75 73 65 64 20  |ld also be used |
000003c0  61 73 20 0d 61 20 73 69  6d 70 6c 65 20 22 66 72  |as .a simple "fr|
000003d0  6f 6e 74 20 65 6e 64 22  20 74 6f 20 79 6f 75 72  |ont end" to your|
000003e0  20 41 44 46 53 20 64 69  73 63 73 2c 20 65 6e 61  | ADFS discs, ena|
000003f0  62 6c 69 6e 67 20 65 61  73 79 20 0d 61 63 63 65  |bling easy .acce|
00000400  73 73 20 74 6f 20 6e 65  73 74 65 64 20 64 69 72  |ss to nested dir|
00000410  65 63 74 6f 72 69 65 73  2e 20 0d 0d 0d 20 55 73  |ectories. ... Us|
00000420  69 6e 67 20 54 68 65 20  50 72 6f 67 72 61 6d 2e  |ing The Program.|
00000430  20 0d 0d 20 41 73 20 74  68 65 20 70 72 6f 67 72  | .. As the progr|
00000440  61 6d 20 73 74 61 6e 64  73 2c 20 61 20 63 61 74  |am stands, a cat|
00000450  61 6c 6f 67 75 65 20 6f  66 20 74 68 65 20 63 75  |alogue of the cu|
00000460  72 72 65 6e 74 6c 79 20  0d 61 63 74 69 76 65 20  |rrently .active |
00000470  64 69 73 63 20 69 73 20  64 69 73 70 6c 61 79 65  |disc is displaye|
00000480  64 20 61 6e 64 2c 20 62  79 20 75 73 69 6e 67 20  |d and, by using |
00000490  74 68 65 20 63 75 72 73  6f 72 20 6b 65 79 73 2c  |the cursor keys,|
000004a0  20 74 68 65 20 0d 72 65  6c 65 76 61 6e 74 20 66  | the .relevant f|
000004b0  69 6c 65 6e 61 6d 65 20  63 61 6e 20 62 65 20 73  |ilename can be s|
000004c0  65 6c 65 63 74 65 64 20  62 79 20 70 72 65 73 73  |elected by press|
000004d0  69 6e 67 20 74 68 65 20  52 45 54 55 52 4e 20 0d  |ing the RETURN .|
000004e0  6b 65 79 2e 20 54 68 65  20 70 72 6f 67 72 61 6d  |key. The program|
000004f0  20 74 68 65 6e 20 73 69  6d 70 6c 79 20 70 72 69  | then simply pri|
00000500  6e 74 73 20 6f 75 74 20  74 68 65 20 6e 61 6d 65  |nts out the name|
00000510  20 74 68 61 74 20 77 61  73 20 0d 73 65 6c 65 63  | that was .selec|
00000520  74 65 64 2e 20 4e 6f 74  65 20 74 68 61 74 20 69  |ted. Note that i|
00000530  66 20 74 68 65 20 41 44  46 53 20 69 73 20 61 63  |f the ADFS is ac|
00000540  74 69 76 65 2c 20 61 6c  6c 20 64 69 72 65 63 74  |tive, all direct|
00000550  6f 72 69 65 73 20 0d 61  72 65 20 73 68 6f 77 6e  |ories .are shown|
00000560  20 69 6e 20 79 65 6c 6c  6f 77 2c 20 61 6e 64 20  | in yellow, and |
00000570  73 65 6c 65 63 74 69 6e  67 20 6f 6e 65 20 6f 66  |selecting one of|
00000580  20 74 68 65 6d 20 72 65  73 75 6c 74 73 20 69 6e  | them results in|
00000590  20 0d 74 68 61 74 20 64  69 72 65 63 74 6f 72 79  | .that directory|
000005a0  20 62 65 69 6e 67 20 65  6e 74 65 72 65 64 20 66  | being entered f|
000005b0  72 6f 6d 20 77 68 69 63  68 20 66 75 72 74 68 65  |rom which furthe|
000005c0  72 20 73 65 6c 65 63 74  69 6f 6e 73 20 0d 63 61  |r selections .ca|
000005d0  6e 20 62 65 20 6d 61 64  65 2e 20 0d 0d 0d 20 54  |n be made. ... T|
000005e0  68 65 20 53 75 62 72 6f  75 74 69 6e 65 73 2e 20  |he Subroutines. |
000005f0  0d 0d 20 44 45 46 46 4e  73 65 6c 65 63 74 28 54  |.. DEFFNselect(T|
00000600  24 29 20 2d 20 54 68 69  73 20 66 75 6e 63 74 69  |$) - This functi|
00000610  6f 6e 20 74 61 6b 65 73  20 61 20 73 74 72 69 6e  |on takes a strin|
00000620  67 20 61 73 20 61 20 70  61 72 61 6d 65 74 65 72  |g as a parameter|
00000630  20 0d 77 68 69 63 68 20  61 63 74 73 20 61 73 20  | .which acts as |
00000640  74 68 65 20 74 69 74 6c  65 20 74 68 61 74 20 69  |the title that i|
00000650  73 20 74 6f 20 62 65 20  64 69 73 70 6c 61 79 65  |s to be displaye|
00000660  64 20 77 68 69 6c 65 20  69 6e 70 75 74 20 0d 6f  |d while input .o|
00000670  66 20 74 68 65 20 72 65  71 75 69 72 65 64 20 66  |f the required f|
00000680  69 6c 65 6e 61 6d 65 20  69 73 20 62 65 69 6e 67  |ilename is being|
00000690  20 6d 61 64 65 2e 20 54  68 65 20 76 61 6c 75 65  | made. The value|
000006a0  20 72 65 74 75 72 6e 65  64 20 0d 62 79 20 74 68  | returned .by th|
000006b0  65 20 66 75 6e 63 74 69  6f 6e 20 69 73 20 61 6c  |e function is al|
000006c0  73 6f 20 61 20 73 74 72  69 6e 67 20 77 68 69 63  |so a string whic|
000006d0  68 20 72 65 70 72 65 73  65 6e 74 73 20 74 68 65  |h represents the|
000006e0  20 0d 66 69 6c 65 6e 61  6d 65 20 74 68 61 74 20  | .filename that |
000006f0  77 61 73 20 73 65 6c 65  63 74 65 64 2e 20 49 66  |was selected. If|
00000700  20 69 6e 20 44 46 53 2c  20 74 68 65 20 66 69 6c  | in DFS, the fil|
00000710  65 6e 61 6d 65 20 77 69  6c 6c 20 62 65 20 0d 70  |ename will be .p|
00000720  72 65 63 65 64 65 64 20  77 69 74 68 20 69 74 73  |receded with its|
00000730  20 64 69 72 65 63 74 6f  72 79 20 61 6e 64 20 61  | directory and a|
00000740  20 64 6f 74 2c 20 77 68  65 72 65 61 73 20 69 66  | dot, whereas if|
00000750  20 41 44 46 53 20 69 73  20 0d 61 63 74 69 76 65  | ADFS is .active|
00000760  2c 20 6a 75 73 74 20 74  68 65 20 66 69 6c 65 6e  |, just the filen|
00000770  61 6d 65 20 69 73 20 72  65 74 75 72 6e 65 64 20  |ame is returned |
00000780  28 73 69 6e 63 65 20 74  68 65 20 64 69 72 65 63  |(since the direc|
00000790  74 6f 72 79 20 0d 69 6e  20 77 68 69 63 68 20 74  |tory .in which t|
000007a0  68 69 73 20 66 69 6c 65  20 69 73 20 63 6f 6e 74  |his file is cont|
000007b0  61 69 6e 65 64 20 68 61  73 20 61 6c 72 65 61 64  |ained has alread|
000007c0  79 20 62 65 65 6e 20 65  6e 74 65 72 65 64 20 62  |y been entered b|
000007d0  79 20 0d 74 68 65 20 72  6f 75 74 69 6e 65 2c 20  |y .the routine, |
000007e0  69 74 20 69 73 20 70 6f  69 6e 74 6c 65 73 73 20  |it is pointless |
000007f0  70 61 73 73 69 6e 67 20  69 74 20 62 61 63 6b 29  |passing it back)|
00000800  2e 20 49 66 20 61 6e 20  65 72 72 6f 72 20 0d 6f  |. If an error .o|
00000810  63 63 75 72 73 2c 20 74  68 65 6e 20 74 68 65 20  |ccurs, then the |
00000820  73 74 72 69 6e 67 20 22  45 72 72 6f 72 45 72 72  |string "ErrorErr|
00000830  6f 72 45 72 72 6f 72 22  20 77 69 6c 6c 20 62 65  |orError" will be|
00000840  20 72 65 74 75 72 6e 65  64 20 2c 20 0d 77 68 69  | returned , .whi|
00000850  63 68 20 69 73 20 6f 76  65 72 20 74 65 6e 20 63  |ch is over ten c|
00000860  68 61 72 61 63 74 65 72  73 20 61 6e 64 20 63 61  |haracters and ca|
00000870  6e 20 6e 6f 74 20 74 68  65 72 65 66 6f 72 65 20  |n not therefore |
00000880  62 65 20 0d 6d 69 73 74  61 6b 65 6e 20 61 73 20  |be .mistaken as |
00000890  61 20 66 69 6c 65 6e 61  6d 65 2e 20 0d 0d 20 54  |a filename. .. T|
000008a0  68 69 73 20 66 75 6e 63  74 69 6f 6e 20 77 6f 72  |his function wor|
000008b0  6b 73 20 62 79 20 66 69  72 73 74 6c 79 20 6f 62  |ks by firstly ob|
000008c0  74 61 69 6e 69 6e 67 20  74 68 65 20 63 75 72 72  |taining the curr|
000008d0  65 6e 74 6c 79 20 0d 61  63 74 69 76 65 20 66 69  |ently .active fi|
000008e0  6c 69 6e 67 20 73 79 73  74 65 6d 20 75 73 69 6e  |ling system usin|
000008f0  67 20 74 68 65 20 6f 70  65 72 61 74 69 6e 67 20  |g the operating |
00000900  73 79 73 74 65 6d 20 28  4f 2e 53 2e 29 20 0d 72  |system (O.S.) .r|
00000910  6f 75 74 69 6e 65 20 22  4f 53 41 52 47 53 22 20  |outine "OSARGS" |
00000920  61 74 20 26 46 46 44 41  20 77 69 74 68 20 41 3d  |at &FFDA with A=|
00000930  30 2c 20 59 3d 30 2e 20  55 73 69 6e 67 20 74 68  |0, Y=0. Using th|
00000940  69 73 20 72 65 73 75 6c  74 2c 20 0d 65 69 74 68  |is result, .eith|
00000950  65 72 20 74 68 65 20 22  67 65 74 41 44 46 53 63  |er the "getADFSc|
00000960  61 74 22 20 6f 72 20 22  67 65 74 44 46 53 63 61  |at" or "getDFSca|
00000970  74 22 20 66 75 6e 63 74  69 6f 6e 20 69 73 20 63  |t" function is c|
00000980  61 6c 6c 65 64 20 0d 0d  73 63 72 65 65 6e 20 69  |alled ..screen i|
00000990  6e 20 74 68 72 65 65 20  63 6f 6c 75 6d 6e 73 20  |n three columns |
000009a0  28 74 68 75 73 20 65 6e  61 62 6c 69 6e 67 20 75  |(thus enabling u|
000009b0  70 20 74 6f 20 34 37 20  66 69 6c 65 6e 61 6d 65  |p to 47 filename|
000009c0  73 20 74 6f 20 0d 62 65  20 73 68 6f 77 6e 20 61  |s to .be shown a|
000009d0  74 20 6f 6e 63 65 29 2c  20 61 6e 64 20 61 20 63  |t once), and a c|
000009e0  75 72 73 6f 72 20 61 63  74 69 76 61 74 65 64 20  |ursor activated |
000009f0  77 68 69 63 68 20 65 6e  61 62 6c 65 73 20 65 61  |which enables ea|
00000a00  73 79 20 0d 73 65 6c 65  63 74 69 6f 6e 20 6f 66  |sy .selection of|
00000a10  20 61 6e 79 20 65 6e 74  72 79 20 69 6e 20 74 68  | any entry in th|
00000a20  65 20 63 61 74 61 6c 6f  67 75 65 2e 20 54 68 65  |e catalogue. The|
00000a30  20 73 65 6c 65 63 74 69  6f 6e 20 73 6f 20 0d 6d  | selection so .m|
00000a40  61 64 65 20 69 73 20 72  65 74 75 72 6e 65 64 20  |ade is returned |
00000a50  61 73 20 74 68 65 20 72  65 73 75 6c 74 20 6f 66  |as the result of|
00000a60  20 74 68 65 20 66 75 6e  63 74 69 6f 6e 2e 20 0d  | the function. .|
00000a70  0d 0d 20 44 45 46 46 4e  67 65 74 44 46 53 63 61  |.. DEFFNgetDFSca|
00000a80  74 20 20 2d 20 54 68 65  20 63 75 72 72 65 6e 74  |t  - The current|
00000a90  6c 79 20 61 63 74 69 76  65 20 64 72 69 76 65 20  |ly active drive |
00000aa0  69 73 20 72 65 61 64 20  66 69 72 73 74 20 62 79  |is read first by|
00000ab0  20 0d 75 73 69 6e 67 20  74 68 65 20 4f 2e 53 2e  | .using the O.S.|
00000ac0  20 72 6f 75 74 69 6e 65  20 22 4f 53 47 42 50 42  | routine "OSGBPB|
00000ad0  22 20 61 74 20 26 46 46  44 31 20 77 69 74 68 20  |" at &FFD1 with |
00000ae0  41 3d 36 2e 20 54 68 65  20 66 69 72 73 74 20 0d  |A=6. The first .|
00000af0  74 77 6f 20 73 65 63 74  6f 72 73 20 6f 66 20 74  |two sectors of t|
00000b00  72 61 63 6b 20 30 20 61  72 65 20 74 68 65 6e 20  |rack 0 are then |
00000b10  72 65 61 64 20 69 6e 20  75 73 69 6e 67 20 22 4f  |read in using "O|
00000b20  53 57 4f 52 44 22 20 61  74 20 0d 26 46 46 46 31  |SWORD" at .&FFF1|
00000b30  20 77 69 74 68 20 41 3d  26 37 46 2c 20 74 68 75  | with A=&7F, thu|
00000b40  73 20 6f 62 74 61 69 6e  69 6e 67 20 61 20 63 6f  |s obtaining a co|
00000b50  70 79 20 6f 66 20 74 68  65 20 63 61 74 61 6c 6f  |py of the catalo|
00000b60  67 75 65 20 0d 73 65 63  74 6f 72 73 20 69 6e 20  |gue .sectors in |
00000b70  6d 65 6d 6f 72 79 2e 20  54 68 69 73 20 6d 65 6d  |memory. This mem|
00000b80  6f 72 79 20 69 73 20 74  68 65 6e 20 64 65 63 6f  |ory is then deco|
00000b90  64 65 64 20 74 6f 20 6f  62 74 61 69 6e 20 74 68  |ded to obtain th|
00000ba0  65 20 0d 66 69 6c 65 6e  61 6d 65 73 20 77 68 69  |e .filenames whi|
00000bb0  63 68 20 61 72 65 20 74  68 65 6e 20 65 6e 74 65  |ch are then ente|
00000bc0  72 65 64 20 69 6e 74 6f  20 74 68 65 20 61 72 72  |red into the arr|
00000bd0  61 79 20 22 6e 61 6d 65  24 28 29 22 2e 20 0d 54  |ay "name$()". .T|
00000be0  68 65 20 6e 75 6d 62 65  72 20 6f 66 20 66 69 6c  |he number of fil|
00000bf0  65 6e 61 6d 65 73 20 72  65 61 64 20 69 73 20 72  |enames read is r|
00000c00  65 74 75 72 6e 65 64 20  61 73 20 74 68 65 20 76  |eturned as the v|
00000c10  61 6c 75 65 20 6f 66 20  74 68 65 20 0d 66 75 6e  |alue of the .fun|
00000c20  63 74 69 6f 6e 2e 20 0d  0d 0d 20 44 45 46 46 4e  |ction. ... DEFFN|
00000c30  67 65 74 41 44 46 53 63  61 74 20 2d 20 54 68 69  |getADFScat - Thi|
00000c40  73 20 66 75 6e 63 74 69  6f 6e 20 68 61 73 20 65  |s function has e|
00000c50  78 61 63 74 6c 79 20 74  68 65 20 73 61 6d 65 20  |xactly the same |
00000c60  74 61 73 6b 20 61 73 20  0d 74 68 65 20 70 72 65  |task as .the pre|
00000c70  76 69 6f 75 73 20 6f 6e  65 2c 20 62 75 74 20 66  |vious one, but f|
00000c80  6f 72 20 74 68 65 20 41  44 46 53 2e 20 54 68 65  |or the ADFS. The|
00000c90  20 66 69 6c 65 6e 61 6d  65 73 20 6f 66 20 74 68  | filenames of th|
00000ca0  65 20 0d 63 75 72 72 65  6e 74 20 64 69 72 65 63  |e .current direc|
00000cb0  74 6f 72 79 20 61 72 65  20 72 65 61 64 20 69 6e  |tory are read in|
00000cc0  20 75 73 69 6e 67 20 4f  2e 53 2e 20 63 61 6c 6c  | using O.S. call|
00000cd0  20 22 4f 53 47 42 50 42  22 20 61 74 20 0d 26 46  | "OSGBPB" at .&F|
00000ce0  46 44 31 20 77 69 74 68  20 41 3d 38 2e 20 54 68  |FD1 with A=8. Th|
00000cf0  65 20 72 6f 75 74 69 6e  65 20 74 68 65 6e 20 63  |e routine then c|
00000d00  68 65 63 6b 73 20 65 61  63 68 20 66 69 6c 65 6e  |hecks each filen|
00000d10  61 6d 65 20 74 6f 20 73  65 65 20 0d 69 66 20 69  |ame to see .if i|
00000d20  74 20 69 73 20 61 20 66  69 6c 65 20 6f 72 20 64  |t is a file or d|
00000d30  69 72 65 63 74 6f 72 79  20 28 61 20 6e 6f 74 65  |irectory (a note|
00000d40  20 69 73 20 6d 61 64 65  20 62 79 20 70 6c 61 63  | is made by plac|
00000d50  69 6e 67 20 0d 65 69 74  68 65 72 20 31 20 6f 72  |ing .either 1 or|
00000d60  20 32 20 69 6e 20 74 68  65 20 22 64 69 72 22 20  | 2 in the "dir" |
00000d70  61 72 72 61 79 20 72 65  73 70 65 63 74 69 76 65  |array respective|
00000d80  6c 79 29 2c 20 62 79 20  75 73 69 6e 67 20 0d 22  |ly), by using ."|
00000d90  4f 53 46 49 4c 45 22 20  61 74 20 26 46 46 44 44  |OSFILE" at &FFDD|
00000da0  20 77 69 74 68 20 41 3d  35 2e 20 0d 0d 0d 20 50  | with A=5. ... P|
00000db0  6c 61 63 69 6e 67 20 54  68 65 20 53 75 62 72 6f  |lacing The Subro|
00000dc0  75 74 69 6e 65 73 20 49  6e 20 59 6f 75 72 20 4f  |utines In Your O|
00000dd0  77 6e 20 50 72 6f 67 72  61 6d 73 2e 20 0d 0d 20  |wn Programs. .. |
00000de0  41 74 20 74 68 65 20 62  65 67 69 6e 6e 69 6e 67  |At the beginning|
00000df0  20 6f 66 20 79 6f 75 72  20 70 72 6f 67 72 61 6d  | of your program|
00000e00  2c 20 77 6f 72 6b 73 70  61 63 65 20 6d 75 73 74  |, workspace must|
00000e10  20 62 65 20 73 65 74 20  0d 61 73 69 64 65 20 66  | be set .aside f|
00000e20  6f 72 20 74 68 65 20 72  6f 75 74 69 6e 65 73 20  |or the routines |
00000e30  62 79 20 65 6e 74 65 72  69 6e 67 20 0d 20 20 0d  |by entering .  .|
00000e40  44 49 4d 20 70 61 72 61  6d 25 20 31 38 2c 64 61  |DIM param% 18,da|
00000e50  74 61 25 20 35 31 37 2c  6e 61 6d 65 24 28 34 36  |ta% 517,name$(46|
00000e60  29 2c 64 69 72 25 28 34  36 29 20 0d 0d 20 54 68  |),dir%(46) .. Th|
00000e70  65 20 66 75 6e 63 74 69  6f 6e 20 64 65 66 69 6e  |e function defin|
00000e80  69 74 69 6f 6e 20 22 73  65 6c 65 63 74 22 20 6d  |ition "select" m|
00000e90  75 73 74 20 74 68 65 6e  20 62 65 20 70 6c 61 63  |ust then be plac|
00000ea0  65 64 20 0d 73 6f 6d 65  77 68 65 72 65 20 77 69  |ed .somewhere wi|
00000eb0  74 68 69 6e 20 79 6f 75  72 20 70 72 6f 67 72 61  |thin your progra|
00000ec0  6d 2c 20 61 6c 6f 6e 67  20 77 69 74 68 20 74 68  |m, along with th|
00000ed0  65 20 66 75 6e 63 74 69  6f 6e 73 20 0d 22 67 65  |e functions ."ge|
00000ee0  74 44 46 53 63 61 74 22  20 61 6e 64 20 22 67 65  |tDFScat" and "ge|
00000ef0  74 41 44 46 53 63 61 74  22 2e 20 4e 6f 74 65 20  |tADFScat". Note |
00000f00  74 68 61 74 20 69 66 20  79 6f 75 72 20 70 72 6f  |that if your pro|
00000f10  67 72 61 6d 20 77 69 6c  6c 20 0d 6e 65 76 65 72  |gram will .never|
00000f20  20 75 73 65 20 65 69 74  68 65 72 20 74 68 65 20  | use either the |
00000f30  44 46 53 20 6f 72 20 41  44 46 53 2c 20 74 68 65  |DFS or ADFS, the|
00000f40  6e 20 22 67 65 74 44 46  53 63 61 74 22 20 6f 72  |n "getDFScat" or|
00000f50  20 0d 22 67 65 74 41 44  46 53 63 61 74 22 20 63  | ."getADFScat" c|
00000f60  61 6e 20 62 65 20 6c 65  66 74 20 6f 75 74 20 72  |an be left out r|
00000f70  65 73 70 65 63 74 69 76  65 6c 79 2e 20 0d 0d 0d  |espectively. ...|
00000f80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000fa0  20 20 20 20 20 20 20 52  6f 62 20 41 6e 64 65 72  |       Rob Ander|
00000fb0  73 6f 6e 2e 20 4e 6f 76  2e 27 38 37 20 0d        |son. Nov.'87 .|
00000fbe
17-02-89/CDinfo.m0
17-02-89/CDinfo.m1
17-02-89/CDinfo.m2
17-02-89/CDinfo.m4
17-02-89/CDinfo.m5