On Tue, Sep 23, 2008 at 04:59:01PM +0200, Dirk Jagdmann wrote: > I'm failing to delete/remove/scratch files on C64 with a drive/device != > 8. I know that the remove() function is supposed to accept a file spec à > la "drivenum:filename,this,that", but from reading the fnparse assembler > function I assume the drivenum can only be "0" or "1". Is that true, or > didn't I interpret the fnparse sources correctly? Yes, that is true. The drive number is really a drive number, not the device address on the IEC bus. It is used to distinguish the drives of a dual disk drive like the 4040. > If it is true, are the > various CBM routines supposed to support devices like 8, 11, 21? Yes. Just assign the drive unit number to _curunit: _curunit = 11; ... See cbm.h: ---------------------------------------------------------------------------- /* The file stream implementation and the POSIX I/O functions will use the * following variables to determine the file type and the disk unit to use. */ extern unsigned char _curunit; /* Default 8 */ extern unsigned char _filetype; /* Default 'u' */ ---------------------------------------------------------------------------- > Or how can I send arbitrary drive commands to a drive with the C API? See cbm.h: ---------------------------------------------------------------------------- /* Kernel level functions */ void __fastcall__ cbm_k_setlfs (unsigned char LFN, unsigned char DEV, unsigned char SA); void __fastcall__ cbm_k_setnam (const char* Name); [...] ---------------------------------------------------------------------------- Regards Uz -- Ullrich von Bassewitz uz@musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Tue Sep 23 17:52:34 2008
This archive was generated by hypermail 2.1.8 : 2008-09-23 17:52:36 CEST