Re: [cc65] cbm_readdir

From: Greg King <greg.king41verizon.net>
Date: 2009-09-30 10:51:48
From: "Thomas Giesel"; on Monday, Sept. 28, 2009; at 03:20 PM -0400
>
> But, there are some questions:
> from "cbm.h":
>
> #define CBM_T_CBM   5           /* 1581 sub-partition */
> #define CBM_T_DIR   6           /* IDE64 and CMD sub-directory */
> #define CBM_T_VRP   8           /* Vorpal fast-loadable format */
> #define CBM_T_OTHER 5           /* Other file-types not yet defined */
>
> Is there a reason for using the value 5 twice?
> Is the value 7 reserved for something?

It is a typographical error.  It is supposed to be:

#define CBM_T_CBM   5           /* 1581 sub-partition */
#define CBM_T_DIR   6           /* IDE64 and CMD sub-directory */
#define CBM_T_LNK   7           /* IDE64 soft-link */
#define CBM_T_VRP   8           /* Vorpal fast-loadable format */
#define CBM_T_OTHER 15          /* Other file-types not yet defined */

The idea is that the file-type bit-field is four bits wide.  The maximum
value (for that field) is a flag that says, "I saw a file-type abbreviation
(in the listing) that I don't understand."

I added the VRP line for the sake of completeness.  I don't know of
anything else that uses that number.  The Vorpal Toolkit installs code in a
drive's RAM that also intercepts directory operations.  It shows "VRP" as
the file-type for its files (the drive's ROM usually shows some punctuation
marks, for the Vorpal file-type, when it lists a directory).

----------------------------------------------------------------------
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 Sep 30 11:37:56 2009

This archive was generated by hypermail 2.1.8 : 2009-09-30 11:37:58 CEST