Thornton 2 dot Com
1K5BU

GEOS Errors

Ariel's GEOS Programmer's Reference Guide
Back: Memory Map (WIP) Up: Contents Next: Glossary

Quick Reference

Code Symbol Summary
$00 NO_ERROR Success
$01 NO_BLOCKS Not Enough Blocks
$02 INV_TRACK Invalid Track
$03 INSUFF_SPACE Not Enough Blocks on Disk
$04 FULL_DIRECTORY Directory Full
$05 FILE_NOT_FOUND File Not Found
$06 BAD_BAM Bad Block Availability Map
$07 UNOPENED_VLIR Unopened VLIR File
$08 INV_RECORD Invalid Record
$09 OUT_OF_RECORDS Can't Insert or Append More Records
$0a STRUCT_MISMAT File Structure Mismatch
$0b BFR_OVERFLOW Buffer Overflow During Load
$0c CANCEL_ERR Deliberate Cancel Error
$0d DEV_NOT_FOUND Device Not Found
$0e INCOMPATIBLE Program Incompatible with Current Mode
$20 HDR_NOT_THERE File Header Block Not Found
$21 NO_SYNC Sync Mark Not Found
$22 DBLK_NOT_THERE Data Block Not Present
$23 DAT_CHKSUM_ERR Data Block Checksum Error
$25 WR_VER_ERR Write Verify Error
$26 WR_PR_ON Disk Is Write Protected
$27 HDR_CHKSUM_ERR Header Block Checksum Error
$29 DSK_ID_MISMAT Disk ID Mismatch
$2e BYTE_DEC_ERR Byte Decode Error
$73 DOS_MISMATCH Wrong DOS Indicator on Disk

Every GEOS Kernal routine that returns an error code returns it in the X register. The code is one of the following bytes.

Each heading below is the error number, followed by the geoProgrammer symbol defined for that number (except where noted otherwise), followed by a brief summary (most taken from geosConstants).

No Error

$00 - NO_ERROR - Success

This is the code returned by every routine which succeeds without any error condition. The symbol is not in geosSym.

Disk Errors

$01 - NO_BLOCKS - Not Enough Blocks

When writing, there are not enough blocks on the device to hold all the data.

When reading, the last block in the file was encountered before the requested number of blocks could be transfered.

The Official GEOS Programmer's Reference Guide defines NOT_ENOUGH_BLOCKS.

$02 - INV_TRACK - Invalid Track

An attempt was made to read or write a track number that does not exist. This can happen if a 1571-formatted disk is used in a 1541 drive, and part of a file resides on the second side.

The Official GEOS Programmer's Reference Guide defines INVALID_TRACK.

$03 - INSUFF_SPACE - Not Enough Blocks on Disk

The number of free blocks to allocate is less than the number of blocks requested. The disk is too full.

The Official GEOS Programmer's Reference Guide defines INSUFFICIENT_SPACE.

$04 - FULL_DIRECTORY - Directory Full

There are no free directory entry slots between the page passed and the last possible directory block.

If GetFreeDirBlk can't find an empty slot before the end of the allocated pages, then it will add a new page to the disk directory. This error means that there's no more room in the directory to add new page.

Important: Unless the page number passed is 0, then this error doesn't necessarily mean that no free directory entry slots exist anywhere in the directory; it's possible free slots exist in pages lower than the one requested.

$05 - FILE_NOT_FOUND - File Not Found

A search of the disk directory failed to find the filename requested.

$06 - BAD_BAM - Bad Block Availability Map

Something is wrong with the copy of the BAM in curDirHead. Examples include:

$07 - UNOPENED_VLIR - Unopened VLIR File

An attempt was made to access or change a Variable Length Index Record (VLIR) file before opening it or after closing it. Open it with OpenRecordFile first, then try again.

The Official GEOS Programmer's Reference Guide defines UNOPENED_VLIR_FILE.

$08 - INV_RECORD - Invalid Record

An attempt was made to access, modify, or change to a record that doesn't exist in the current VLIR file. The Official GEOS Programmer's Reference Guide remarks that this error isn't fatal and that it can be used to move the record pointer along and find the end of a chain of records.

The Official GEOS Programmer's Reference Guide defines INVALID_RECORD.

$09 - OUT_OF_RECORDS - Can't Insert or Append More Records

The current VLIR file already contains the maximum number of records (127). No more records can be inserted or appened.

$0a - STRUCT_MISMAT - File Structure Mismatch

A VLIR routine was attempted on a non-VLIR file, a non-VLIR routine was attempted on a VLIR file, or there was some other structural incompatibility between the routine called and the file it was given.

The Official GEOS Programmer's Reference Guide defines STRUCT_MISMATCH.

$0b - BFR_OVERFLOW - Buffer Overflow During Load

The buffer given to ReadFile is too small for the file being read. The buffer is not actually overrun, but not all the file data is read.

The Official GEOS Programmer's Reference Guide defines BUFFER_OVERFLOW.

$0c - CANCEL_ERR - Deliberate Cancel Error

The operation was deliberately canceled.

This error code exists so that a lower-level disk access routine can detect a condition that needs a decision from the user whether to proceed or cancel, prompt the user (such as with a dialog box), and if the user chooses to cancel, stop this routine and all the higher-level routines that called it via the standard disk error reporting convention.

$0d - DEV_NOT_FOUND - Device Not Found

The serial bus device wasn't found, or the needed Ram Expansion Unit (REU) bank wasn't found, or no REU is installed.

The Official GEOS Programmer's Reference Guide defines DEVICE_NOT_FOUND.

$0e - INCOMPATIBLE - Program Incompatible with Current Mode

In GEOS 128, this error means that the program to be loaded can't be run in the current graphics mode.

$20 - HDR_NOT_THERE - File Header Block Not Found

When attempting to access a file, its header block couldn't be found.

The Official GEOS Programmer's Reference Guide defines HDR_BLK_NOT_THERE.

$21 - NO_SYNC - Sync Mark Not Found

The drive can't find the sync mark on the disk. The most typical causes are that there's no disk in the drive, the drive door is open, and the disk is unformatted. This can also occur if the disk is not a "flippy" disk and the user put it in the drive upside down.

$22 - DBLK_NOT_THERE - Data Block Not Present

A file's data block was not found.

The Official GEOS Programmer's Reference Guide defines DATA_BLK_NOT_THERE.

$23 - DAT_CHKSUM_ERR - Data Block Checksum Error

The data block's computed checksum did not match the stored checksum. There is a bad block on the disk.

The Official GEOS Programmer's Reference Guide defines DATA_CHKSUM_ERR.

$25 - WR_VER_ERR - Write Verify Error

The verify operation after a write failed. Typical causes are a bad disk block and a malfunctioning disk drive.

$26 - WR_PR_ON - Disk Is Write Protected

An attempt was made to write to a disk that is write-protected.

On a 5.25-inch disk, the tab covering the write-protect notch must be removed before data can be written. On a 3.5-inch disk, the write-protect notch must be covered by the sliding tab before data can be written. 5.25-inch disks without a notch and 3.5-inch disks without a sliding tab are permanently write-protected.

This error can also occur if the user is trying to make a 1541 "flippy" disk without punching the required notch (or worse, punching the notch in the wrong location).

$27 - HDR_CHKSUM_ERR - Header Block Checksum Error

The header block's computed checksum did not match the stored checksum.

$29 - DSK_ID_MISMAT - Disk ID Mismatch

The ID read from the disk doesn't match the ID expected. This typically means the user swapped one disk for another in between disk accesses without prompting from your program. Either reopen and work with the new disk or prompt the user to insert the disk your program expected.

The Official GEOS Programmer's Reference Guide defines DSK_ID_MISMATCH.

$2e - BYTE_DEC_ERR - Byte Decode Error

The drive can't decode the flux transitions off the disk.

The Official GEOS Programmer's Reference Guide defines BYTE_DECODE_ERR.

$73 - DOS_MISMATCH - Wrong DOS Indicator on Disk

The disk indicates it was formatted for use in a disk drive incompatible with the current disk drive. The CBM DOS type "2A" is used on 1541-compatible and 1571-compatible disk, and the CBM DOS type "3D" is used on 1581-compatible disks.