80-Bus News


September–October 1984, Volume 3, Issue 5

Page 39 of 47

This program is split into two portions. Firstly there is a machine code program that gathers up the data and secondly a BASIC program that processes the output and sorts the data into order. The machine code section is loaded into RAM at £1000 and executed at £1000, the user is asked to load the disk into drive 0 and press enter, this reads into RAM the directory and is a very quick operation. When all the directorys of the disks have been read in then the user presses the ‘ESC’ key, you are asked to insert into drive 0 the disk which will contain the completed directory file. This will be the disk containing the BASIC program. The BASIC program should then be run, it reads the file generated by the machine code programme, prints it out, sorts it into alphabetical order and prints it out again. After this it prints out the disk summary. The BASIC program is able to remove certain files name from the listings, for example all disks have the file ‘Exec’ so there is no need to list it out. The user can change or add to lines 1260 – 1480 which is where all the unwanted file names are removed. The file produced by the machine code program can be viewed using the Polydos LIST option or changed using the EDIT facility (be careful as this may well stop the BASIC program operating correctly).

A word of warning; as the directory data is held in RAM then there must be a limit to how many disks can be used although I have used 40 disks without any trouble. Should this be a limitation then the job should be split up into sections and the BASIC program changed to merge several files together. Alternatively change the machine code program to remove unwanted files which would significantly reduce the ammount of data in RAM.

There follows a full Assembly listing including a sorted symbol table, also a dump of the program using a modified version of the disk dump published in Vol.1 issue 2 of 80-BUS NEWS (the numbers on the left hand side are the RAM locations). The BASIC program is also included.

Page 39 of 47