Re: [cc65] Uniform mass storage device discovery and file locations

From: Karri Kaksonen <karri1sipo.fi>
Date: 2012-08-16 13:36:59
Hi Oliver,

So in my case I would end up with something like:

#define ROM0 0
#define ROM1 1
#define EEPROM 2

if (rootdir(EEPROM)) {
   // EEPROM exists
   char *currentdrive = getcwd();
   chdir(rootdir(EEPROM));
   fd = open("0", O_RDONLY);
   read(fd, &highscoretable, sizeof(highscoretable));
   //close(fd);
   chdir(currentdrive);
}

Not bad. It's readable.

The Lynx does not have DMA or a separate controller so there is no need 
for locking operations.

--
Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Aug 16 13:37:25 2012

This archive was generated by hypermail 2.1.8 : 2012-08-16 13:37:29 CEST