home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   CBM      Commodore Computer Conference      4,328 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,132 of 4,328   
   Harry Potter to All   
   31,syntax error,00,00 reading file on .d   
   21 Jan 17 15:36:18   
   
   Hi!  I am working on a special program for the C64 using cc65 and the WinVice   
   3.0 x64 emulator, and, sometimes, when I try to read some files, I get the   
   error message above from the drive.  When the program reads the file, the   
   emulated drive head moves    
   to track 18, then 17, and then, the error is given.  What could be causing the   
   error?  The erroneous code is as follows:   
   ---------------------------   
   extern char* filetypes[];   
      
   static char qfilename[]="0:%s,%c,%c";   
      
   static char fi[32];   
      
   static unsigned char __fastcall__ openfile (char* s, unsigned char mode,   
   unsigned char ftype)   
   {   
   	sprintf (fi, qfilename, s, (char)filetypes[ftype][0], mode==CBM_READ?'r':'w');   
   	gotoxy (0, 0); cputs (fi); putchar ('-'); cgetc();   
   	return cbm_open (filenum, 8, 4, fi);   
   }   
   ------------------------   
   I uploaded a screen shot of the directory read-out to https://so   
   rceforge.net/projects/harryp-cbm/files/test/templates1%20dir.png/download .    
   Now, the main part of this module calls the openfile() function passing   
   through s the string "GUESS #," through    
   mode the CBM_READ constant, and through ftype the entry # in filetypes[]   
   containing "prg."  In other words, the sprintf() function call produces the   
   string "0:GUESS #,p,r."  What could be causing the problem?  :(   
      
   --- SoupGate-Win32 v1.05   
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca