The Compact-Flash Wildcard and CF Card Software Package User Guide
<< Previous | Next>>
4th: END_CAPTURE ( -- )
A do-nothing function that serves as a marker used to terminate File_Capture. To be recognized, END_CAPTURE must be the first non-white-space item on a line. If executed by Forth (for example, during file processing), END_CAPTURE has no effect. See the glossary entry for File_Capture.
C: int End_Update ( void )
4th: End_Update ( -- error )
This routine must be the last function called in an AUTOEXEC.QED file (or other processed file) that is used to perform a software update of the page that contains the code that invoked the update. For example, if a priority autostart routine located on page 4 calls Do_Autoexec, and if the AUTOEXEC.QED file contains 4 File_To_Page, then that file must end with End_Update. End_Update prints a message asking the user to remove the CF Card, stops task switching, closes input and output files, restores prior serial vectors and abort parameters, waits for the CF Card to be removed, then aborts to reboot the processor. This approach prevents a crash which would occur if the autostart routine was replaced while it was executing! This routine is always callable by Process_File, even if the CF Card Forth headers have not been loaded onto the Mosaic controller. See the "How to Create an Autoexec.QED File" section for an example of use.
C: ERR_BAD_OR_UNOPEN_FILEID
4th: ERR_BAD_OR_UNOPEN_FILEID ( -- n )
A constant (equal to 0x4000) that is returned as an error code when an attempt to access a file fails because the specified file_id is invalid, or is not associated with an open file. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_CANNOT_ADD_CLUSTER
4th: ERR_CANNOT_ADD_CLUSTER ( -- n )
A constant (equal to 0x0010) that is returned as an error code when an attempt to allocate a disk cluster fails; this may be because the disk is full. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
C: ERR_CANNOT_TRUNCATE_FILE
4th: ERR_CANNOT_TRUNCATE_FILE ( -- n )
A constant (equal to 0x0200) that is returned as an error code when an attempted truncation of a file fails. Truncation is required when opening a file with W_MODE or WPLUS_MODE access privileges. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_DISK_IS_FULL
4th: ERR_DISK_IS_FULL ( -- n )
A constant (equal to 0x1000) that is returned as an error code when an attempt to write to the disk fails because the disk is full. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_EOF
4th: ERR_EOF ( -- n )
A constant (equal to 0x8000) that is returned as an error code when an end of file condition is encountered during a file access. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error and File_EOF.
C: ERR_FAIL_ID_DRIVE
4th: ERR_FAIL_ID_DRIVE ( -- n )
A constant (equal to 0x0100) that is returned as an error code when a the ATA_ID_Drive command fails. This error message is also returned if Init_File_System or Init_File_IO is not called before attempting to call a file manipulation function. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error (see its glossary entry). This error code is relevant for both the low level ATA drivers and the high level file system functions; thus it also has the name FAIL_ID_DRIVE to be consistent with the ATA failure codes.
C: ERR_FILE_DOES_NOT_EXIST
4th: ERR_FILE_DOES_NOT_EXIST ( -- n )
A constant (equal to 0x0400) that is returned as an error code when a file is required to exist but does not. Pre-existence is required when opening a file with R_MODE or RPLUS_MODE access privileges. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_INVALID_SECTOR_NUMBER
4th: ERR_INVALID_SECTOR_NUMBER ( -- n )
A constant (equal to 0x0008) that is returned as an error code when a disk access to an out-of-range sector number is attempted. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
C: ERR_NEGATIVE_FILE_POSN
4th: ERR_NEGATIVE_FILE_POSN ( -- n )
A constant (equal to 0x0020) that is returned as an error code when the file position pointer is set to a negative value. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
C: ERR_NOT_DOSFAT_DRIVE
4th: ERR_NOT_DOSFAT_DRIVE ( -- n )
A constant (equal to 0x0004) that is returned as an error code when the boot sector of an ATA Flash drive is not properly formatted with a DOS-compatible FAT file system. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
C: ERR_READ_ACCESS_VIOLATION
4th: ERR_READ_ACCESS_VIOLATION ( -- n )
A constant (equal to 0x0080) that is returned as an error code when a read is attempted on a write-only file. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
C: ERR_ROOT_DIR_FULL
4th: ERR_ROOT_DIR_FULL ( -- n )
A constant (equal to 0x0800) that is returned as an error code when an attempt to add a file to the root directory fails. The maximum number of files in the root directory is set when the flash card is formatted. For example, the root directory of a 10 Megabyte card can contain a maximum of 512 files. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_TOO_MANY_FILES_OPEN
4th: ERR_TOO_MANY_FILES_OPEN ( -- n )
A constant (equal to 0x2000) that is returned as an error code when an attempt to open a file fails because the maximum number of files as set by Init_File_Heap (called by Init_File_IO and Init_File_System) has been exceeded. Note that some file operations such as File_Type or File_Copy need to open and then close one or two files. To proceed, use File_Close to close any unneeded files. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function. Because this error is associated with operations that are performed on a file that does not have a valid file_id, it cannot be accessed by File_Error; use Report_File_Open_Errors for diagnostics.
C: ERR_WRITE_ACCESS_VIOLATION
4th: ERR_WRITE_ACCESS_VIOLATION ( -- n )
A constant (equal to 0x0040) that is returned as an error code when a write is attempted to a read-only file. Note that File_Open will 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. All error codes returned by the file system functions have names starting with "ERR", have a single-bit set, and may be OR'd together to represent multiple errors. This constant may be used as a bitmask to decode the value returned by a calling file system function or by File_Error. See File_Error.
<< Previous | Next>>
|