SB BBC @ GBR Oldie hints/tips #084-086 Hints and tips from the archives of Wakefield BBC Micro User Group... 84. *SAVE bug ~~~~~~~~~ It is useful to be able to save very long dummy files when reserving disc space for random access files, (or for other purposes), as recommended in the Acorn DFS User Guide. The syntax is *SAVE 0 N or *SAVE 0+N, where N is the length in Hex. This is very fast, and works fine on the 1.20 Acorn DFS, (DNFS). However, on the 0.90 Acorn DFS, horrible things happen as soon as N exceeds &FF00, (just under 64k), and the disc tends to be corrupted. The alternative is use OPENOUT, and advance PTR# to the required length. In the example below, an 88k file can be reserved, albeit very slowly. The DNFS is much faster than the 0.90 all round, but the difference is particularly noticeable when you are using Random Access Filing, and it's worth upgrading if you can get hold of the EPROM. The Acorn 1770/1772 DFS does not suffer from this problem. Remember that 1k is 1024 bytes, so PRINT &16000/1024 gives the answer 88k. 10 chan=OPENOUT("name"):PTR#chan=&16000:CLOSE#chan 85. Disc drive hints ~~~~~~~~~~~~~~~~ *BACKUP produces a duplicate of the original disc, with all the files, (programs), in the same order on the disc. *COPY, on the other hand, reverses the order on the disc. The catalogue will not show this up, as it is always in alphabetical order, but you can tell if you use *COMPACT or *INFO. If you use a '*' command which none of the ROMs recognize, then the Acorn DFS's will attempt to *RUN a file of that name. If the file is not a machine-code routine, then the attempt will fail. However, the Watford DFS's go one step further, because they will *EXEC the file if it is text, (ie if it has been SPOOLed onto disc). This was written before the Master and the 1770 DFS came out. I think that they too are semi-intelligent in this situation. 86. Formatted disc speed ~~~~~~~~~~~~~~~~~~~~ You can get faster response times from your disc just by using the right formatting program. Each floppy has a small index hole near the large centre hole. Some formatters put sector 0 after the index hole on every track. The effect of this is that each time the head steps from one track to the next, it misses the start of sector 0, causing a delay until the index hole comes round again. The better formatters provide an offset of several sectors between each track to allow the head to settle after stepping. The following program was used to compare different formatters. 10 *CAT Return Head to Track 0 and spin disc. 20 TIME=0 30 *VERIFY Must have Watford DFS or Disc Doctor. 40 PRINT TIME The Watford DFS formatter is one of the slowest, somewhat surprisingly being beaten by a BASIC program available free on Micronet. Disc Doctor has a very fast formatter, and the Cumana program is also good. Further improvements in speed can be achieved by moving frequently accessed small files to the outer edge of the disc, i.e. nearer to the catalogue. The prime candidates for this treatment are the !BOOT and MENU files. These files are usually added as an afterthought when the disc is complete, thus placing them near the centre of the disc. This results in much tracking noise, wasted time and head wear each time the disc is booted. Far better to put dummy !BOOT and MENU files on the disc immediately after formatting it, ensuring that these vital files reside (mostly) on track 0. (One way to save a dummy file is to use *SAVE !BOOT 0 1, but this only reserves one sector of 256 bytes, but you can use *SAVE MENU 0 n00, where n is the number of sectors to be reserved.) NB: This was written before the Acorn 1770 DFS was released; this does of course support the *VERIFY command. 73 Rick G4BLT @ GB7WRG