Programming challenge #1 - Directory read

Started by xlar54, October 28, 2008, 03:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

Hey guys, just tossing out a programming challenge...hope you guys are open to it...

Ive been working with reading the disk directory using the U1 command, and its just not fast enough for an app Im working on.  Id like to get some more speed out of it.  So the challenge is this:

1. Write a reusable subroutine in BASIC only
2. For now, just a 1541 disk (no 1581s or 1571s)
3. Return the disk name in DN$ and disk ID in ID$
4. Return an array of filenames on the disk in FI$()
5. Use FAST mode
6. Uncompiled :)

Im using TI$ for timing (not the best, but it gives me some idea for comparison).  I have my code down to 11 seconds for 12 files on disk, and to me this is way too slow.

Any takers?