This program is a little too long to be used as a tutorial, however
it is a useful way to illustrate the ways in which the disk directory
can be used and tailored for your own needs. The program can be used
in its own right but by studying the listing you may be able to learn
how to use your disk drive to greater advantage. The main menu will
also give you a brief insight into modifying display lists.
PROGRAM OPTIONS
1. DISK DIRECTORY - This option allows you to sort the directory in
alphabetical order, either by main file name or extension. The
advantages of sorting by EXTension name are that you can group
together programs of similar function provided of course you use an
extension representative of the program type. Both the option of main
file name and extension are given in the sort routines. By altering
the lines indicated in the REM statements or even deleting them
completely, you may control the types of file read from the directory.
Bear in mind that if this is done not all of the files will be
displayed or included in the file count.
2. RUN PROGRAM - This option allows the user to select and run a
program from the disk, by single stepping through the directory. If
the stepping continues to the end of the directory, the program will
return to the main menu. The instructions for this option are
displayed on the screen.
The line by line description of the program is as follows:
10
|
dimension
variables and goto menu
|
30 - 100
|
open and get
directory - append to work string
|
110 - 160
|
sort menu
|
190 - 250
|
sort main file
names
|
590 - 660
|
sort by extension
|
700 - 740
|
deposit file data
in utility string in ranked order
|
745 - 790
|
print results
|
1100 -1370
|
modify display
list
|
1500 - 1600
|
display directory
for option 2
|
1610
|
exclude
'list' files
|
1620 - 1660
|
compile correct
file name format for RUN
|
Without the REM statements the program will take up 44 sectors on a
disk.
The main disadvantage of the program is that the alphabetical sort
will take several seconds. The more files that are on your disk, the
longer it will take. The main reason for the longish time for this
sort is that after sorting, the directory is deposited, in the correct
order, in a utility string which is then used in a rolling display.
This part of the program can be improved.
|
|
![](../download.gif) |
top