Re: [cc65] C64 - how to use disk I/O?

From: Andreas Koch <email1kochandreas.com>
Date: 2008-11-26 11:56:34
Adrian Siekierka wrote:

> Yes, thank you. But one more thing, i don't know how large the file will 
> be, it may be 200 bytes or 12 kilobytes... Any tips on THAT?

A few lines from a (non-standalone) file selection dialog i used for 
that purpose (maybe there is a more direct way)

#include "cbm.h"


unsigned char error;
struct cbm_dirent direntry;

error=cbm_opendir(4,drive);

   while (!error)
     {
       error=cbm_readdir(4,&direntry);
       if samestring(direntry.name,myfilename)
         mysize=direntry.size;
      ...
     }
cbm_closedir(4);




----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Nov 26 11:56:43 2008

This archive was generated by hypermail 2.1.8 : 2008-11-26 11:56:45 CET