Commodore 128 Alive!

Commodore 128 => 128 programmers => BASIC => Topic started by: xlar54 on October 28, 2008, 03:29 PM

Title: Programming challenge #1 - Directory read
Post by: xlar54 on October 28, 2008, 03:29 PM
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?
EhPortal 1.34 © 2025, WebDev