The Compact-Flash Wildcard and CF Card Software Package User Guide
<< Previous | Next>>
C: RPLUS_MODE
4th: RPLUS_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file may be read or written. If RPLUS_MODE is specified, an error will be returned by File_Open if the file does not already exist. See also R_MODE, W_MODE, A_MODE, WPLUS_MODE, and APLUS_MODE.
C: R_MODE
4th: R_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file is read-only. If R_MODE is specified, an error will be returned by File_Open if the file does not already exist. Once the file is open, writes are not allowed to the file, and the directory entry will not be updated when the file is closed. Note that File_Open will automatically set the access mode of a file to R_MODE (read only) if the directory entry for the file (initialized when the file was originally created) specifies read-only access. See also W_MODE, A_MODE, RPLUS_MODE, WPLUS_MODE, and APLUS_MODE.
C: SECTOR_SIZE
4th: SECTOR_SIZE ( -- n )
A constant that returns 512, which is the sector size (also called the block size) of the ATA drive.
C: int Set_Filesize( ulong needed_filesize, int file_id )
4th: Set_Filesize ( d.needed_filesize\file_id -- error )
A low-level utility that changes the size of the specified file to the indicated size, allocating or de-allocating clusters from the File Allocation Table (FAT) as needed. Returns a nonzero error if a cluster cannot be added; otherwise, writes the new filesize to the mirror copy of the directory entry in RAM, and marks it for update upon the next File_Flush operation. The maximum filesize is limited to Max_File_Size; see its glossary entry for details. The minimum number of clusters per file is 1, even if the filesize=0. This low-level utility should not be needed in most applications, as the File_Open and File_Write functions truncate and add to the file size as needed.
C: void Set_CF_Module( int module_num )
4th: Set_CF_Module ( module_num -- )
Sets the module number specified by the user. This function must be executed before calling any of the initialization functions (Init_File_IO, Init_File_System, or Do_Autoexec). The module number parameter must correspond to the module address set by the module address selection jumpers and the module port (see Table 1 above).
C: uint Volume_Label( char* string_addr, uint string_page )
4th: Volume_Label ( string_xaddr -- count )
Moves the volume label (that is, the assigned disk name) that was read from the boot sector during initialization, as a null-terminated string to the specified string_addr, and returns the count of the string. The count does not include the terminating null. The string is left-justified and space-padded to decimal 11 bytes, and the buffer at string_addr must be at least 12 bytes long. This function returns 0 if the file system is not initialized (see Init_File_System). C programmers will typically specify a string_addr in common RAM with string_page = 0.
C: WPLUS_MODE
4th: WPLUS_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file may be read or written. If WPLUS_MODE is specified, File_Open will truncate the specified file to zero size if it already exists. See also R_MODE, W_MODE, A_MODE, RPLUS_MODE, and APLUS_MODE.
C: W_MODE
4th: W_MODE ( -- n )
A constant that is passed as a file-access privilege parameter to the File_Open function to indicate that the file is write-only. If W_MODE is specified, File_Open will truncate the specified file to zero size if it already exists, and reads of the file will not be allowed. See also R_MODE, A_MODE, RPLUS_MODE, WPLUS_MODE, and APLUS_MODE.
<< Previous | Next>>
|