[net.micro.atari16] ue 3.7

braner@batcomputer.TN.CORNELL.EDU (braner) (09/22/86)

[]

In my version of microEMACS I left the old putc/getc stuff in for other
systems but #if AtST conditionally compile an alternative faster disk I/O
system.  It uses an 18K RAM buffer, and reads/writes it using the GEMDOS
READ/WRITE functions ($3F/40).  (On reading, I first call SFIRST to find
out the length of the file, then I ask READ to read that much or 18K, which-
ever is less.)  That speeded things up tremendously!  I chose 18K because
it is 4 SS tracks or 2 DS tracks, evenly, and the DMA controller can
read whole tracks in one revolution of the disk.  Of course, files start
in middle of tracks so I actually read about half a track at a time.
I guess that's why 36K proved not significantly faster, and even 9K is
quite good!  (A better way would be to read the FAT, find out where the
track boundaries are, and read a full track at a time!)
For more details look at the file "files.c" on my umacs disk.

- Moshe Braner