From: Greg King Date: Mon, 26 May 2014 13:03:43 +0000 (-0400) Subject: Updated the CBM error tables. X-Git-Tag: V2.15~60^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3d6f54b7a6b6497404f8931e71ad5ec488e78a3a;p=cc65 Updated the CBM error tables. * Added more mappings between DOS and C codes. * Changed generic error messages into specific ones. --- diff --git a/libsrc/cbm/oserrlist.s b/libsrc/cbm/oserrlist.s index b856ed0a8..2f980971e 100644 --- a/libsrc/cbm/oserrlist.s +++ b/libsrc/cbm/oserrlist.s @@ -1,15 +1,16 @@ ; -; Ullrich von Bassewitz, 18.07.2002 +; 2002-07-18, Ullrich von Bassewitz +; 2014-05-26, Greg King ; -; Defines the platform specific error list. +; Defines the platform-specific error list. ; -; The table is built as a list of entries +; The table is built as a list of entries: ; ; .byte entrylen ; .byte errorcode ; .asciiz errormsg ; -; and terminated by an entry with length zero that is returned if the +; and, terminated by an entry with length zero that is returned if the ; error code could not be found. ; @@ -49,22 +50,22 @@ __sys_oserrlist: sys_oserr_entry 7, "File not output" sys_oserr_entry 8, "Filename missing" sys_oserr_entry 9, "Illegal device" - sys_oserr_entry 20, "Read error" - sys_oserr_entry 21, "Read error" - sys_oserr_entry 22, "Read error" - sys_oserr_entry 23, "Read error" - sys_oserr_entry 24, "Read error" - sys_oserr_entry 25, "Write error" + sys_oserr_entry 20, "No sector header" + sys_oserr_entry 21, "No sync mark" + sys_oserr_entry 22, "No sector data" + sys_oserr_entry 23, "Checksum error" + sys_oserr_entry 24, "Decode error" + sys_oserr_entry 25, "Verify error" sys_oserr_entry 26, "Write protect on" - sys_oserr_entry 27, "Read error" - sys_oserr_entry 28, "Write error" + sys_oserr_entry 27, "Checksum error" + sys_oserr_entry 28, "Write overrun" sys_oserr_entry 29, "Disk ID mismatch" - sys_oserr_entry 30, "Syntax error" - sys_oserr_entry 31, "Syntax error" - sys_oserr_entry 32, "Syntax error" - sys_oserr_entry 33, "Syntax error (invalid file name)" - sys_oserr_entry 34, "Syntax error (no file given)" - sys_oserr_entry 39, "Syntax error" + sys_oserr_entry 30, "Command not recognized" + sys_oserr_entry 31, "Command not implemented" + sys_oserr_entry 32, "Command too long" + sys_oserr_entry 33, "Invalid write filename" + sys_oserr_entry 34, "No file given" + sys_oserr_entry 39, "File not found" sys_oserr_entry 50, "Record not present" sys_oserr_entry 51, "Overflow in record" sys_oserr_entry 52, "File too large" @@ -77,10 +78,8 @@ __sys_oserrlist: sys_oserr_entry 66, "Illegal track or sector" sys_oserr_entry 67, "Illegal system track or sector" sys_oserr_entry 70, "No channel" - sys_oserr_entry 71, "Directory error" + sys_oserr_entry 71, "BAM error" sys_oserr_entry 72, "Disk full" sys_oserr_entry 73, "DOS version mismatch" sys_oserr_entry 74, "Drive not ready" sys_oserr_sentinel "Unknown error" - - diff --git a/libsrc/cbm/oserror.s b/libsrc/cbm/oserror.s index 6df0d6711..c68830a51 100644 --- a/libsrc/cbm/oserror.s +++ b/libsrc/cbm/oserror.s @@ -1,8 +1,9 @@ ; -; Ullrich von Bassewitz, 17.05.2000 +; 2000-05-17, Ullrich von Bassewitz +; 2014-05-26, Greg King ; ; int __fastcall__ _osmaperrno (unsigned char oserror); -; /* Map a system specific error into a system independent code */ +; /* Map a system-specific error into a system-independent code. */ ; .include "errno.inc" @@ -41,37 +42,37 @@ ErrTab: .byte 7, EINVAL ; File not output .byte 8, EINVAL ; Filename missing .byte 9, ENODEV ; Illegal device -; .byte 20, ; Read error -; .byte 21, ; Read error -; .byte 22, ; Read error -; .byte 23, ; Read error -; .byte 24, ; Read error -; .byte 25, ; Write error + .byte 20, EBUSY ; No sector header + .byte 21, EBUSY ; No sync mark + .byte 22, EIO ; No sector data + .byte 23, EIO ; Checksum error + .byte 24, EIO ; Decode error + .byte 25, EIO ; Verify error .byte 26, EACCES ; Write protect on -; .byte 27, ; Read error -; .byte 28, ; Write error -; .byte 29, ; Disk ID mismatch -; .byte 30, ; Syntax error -; .byte 31, ; Syntax error -; .byte 32, ; Syntax error - .byte 33, EINVAL ; Syntax error (invalid file name) - .byte 34, EINVAL ; Syntax error (no file given) -; .byte 39, ; Syntax error -; .byte 50, ; Record not present -; .byte 51, ; Overflow in record -; .byte 52, ; File too large - .byte 60, EINVAL ; Write file open + .byte 27, EIO ; Checksum error + .byte 28, EIO ; Write overrun + .byte 29, EBUSY ; Disk ID mismatch + .byte 30, EINVAL ; Command not recognized + .byte 31, ENOSYS ; Command not implemented + .byte 32, EINVAL ; Command too long + .byte 33, EINVAL ; Invalid write filename + .byte 34, EINVAL ; No file given + .byte 39, ENOENT ; File not found + .byte 50, ESPIPE ; Record not present + .byte 51, ENOSPC ; Overflow in record + .byte 52, ENOSPC ; File too large + .byte 60, EBUSY ; Write file open .byte 61, EINVAL ; File not open .byte 62, ENOENT ; File not found .byte 63, EEXIST ; File exists .byte 64, EINVAL ; File type mismatch -; .byte 65, ; No block -; .byte 66, ; Illegal track or sector -; .byte 67, ; Illegal system track or sector + .byte 65, ESPIPE ; No block + .byte 66, EINVAL ; Illegal track or sector + .byte 67, EIO ; Illegal system track or sector .byte 70, EBUSY ; No channel -; .byte 71, ; Directory error -; .byte 72, ; Disk full -; .byte 73, ; DOS version mismatch + .byte 71, EIO ; BAM error + .byte 72, ENOSPC ; Disk full + .byte 73, EACCES ; DOS version mismatch .byte 74, ENODEV ; Drive not ready ErrTabSize = (* - ErrTab)