Re: [cc65] ftell and fseek unavailable on c64?

Date view Thread view Subject view

From: Stephan Lesch (slesch_at_studcs.uni-sb.de)
Date: 2003-11-19 18:22:09


On Wed, 19 Nov 2003, carlos wrote:

> Hello,
>
> i think that this is not right, because every sector has two bytes pointing
> to the next sector of the file.
> So one could seek 254 bytes at one time.

If you're writing your own disk routines anyway, it's not too difficult to
do - you could scan the sector chain of a file when it's opened, (or just
scan the link pointers of the whole disk), and update this table when new
sectors are added. It would take maybe 10 seconds for the whole disk,
and then allow you to access any position in any file without
reading it from the start.

But neither your proposal nor mine are compatible with the file handling
in the kernel, the floppy and the C runtime, that's the real
problem I think...

Best,
Stephan


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-19 18:28:30 CET