Pascal III: SOS Error Codes

Following is a list of errors codes available to the Pascal programmer from
the Apple III's Sophisticated Operating System (SOS).

------->  Pascal Errors
 0       No error; normal I/O completion
 1       Out of filename storage space
 2       Bad unit number
 3       Illegal operation (e.g. read from PRINTER:)
 4       Illegal directory spec
 5       Lost unit; no longer on line
 6       Lost file; file no longer in directory
 7       Illegal pathname
 8       No room; insufficient space on diskette
 9       No unit; unit not on line
10       No such file in specified directory
11       Duplicate pathname
12       Attempt to open an already open file
13       Attempt to access a closed file
14       Bad input format; error in reading number
15       Wrong disk format
16       Write protect error; diskette is protected

------->  SOS Device Call Errors
32       (SOS) Invalid request code
33       (SOS) Invalid control/status code
34       (SOS) Invalid control/status parameter list
35       (SOS) Character device not open
36       (SOS) Device not available
37       (SOS) Resource not available

38       (SOS) Invalid operation
39       (SOS) I/O error
42       (SOS) Checksum error
43       (SOS) Device write protected
44       (SOS) Byte count not a multiple of 512
45       (SOS) Block number too large
46       (SOS) Diskette has been switched
48..63   (SOS) Device specific error

------->  SOS File Call Errors
64       (SOS) Invalid pathname syntax
65       (SOS) Too many character files open
66       (SOS) Too many block files open
67       (SOS) Invalid file reference number
68       (SOS) Path not found
69       (SOS) Volume not found
70       (SOS) File not found
71       (SOS) Duplicate file name
72       (SOS) Overrun on volume
73       (SOS) Directory full
74       (SOS) Incompatible file format
75       (SOS) Unsupported file storage type
76       (SOS) Attempted read past end of file
77       (SOS) File position out of range
78       (SOS) Access not allowed
79       (SOS) User supplied buffer too small
80       (SOS) File busy
81       (SOS) Volume format neither SOS nor Apple II

82       (SOS) Not a SOS volume
83       (SOS) Invalid length parameter
84       (SOS) Out of memory for SOS system buffer
85       (SOS) Buffer table full
86       (SOS) Invalid system buffer parameter
87       (SOS) Duplicate volume error
88       (SOS) Not a block device
89       (SOS) Invalid level
90       (SOS) Invalid bitmap address found on volume

------->  Utility Call Errors
112       Invalid Joy_Mode parameter

------->  System Call Errors
123..127

------->  Memory Call Errors
240       Invalid segment address
241       Segment request denied
242       Segment table full
243       Invalid segment number
244       Segment not found
245       Invalid Search_Mode parameter
246       Invalid Change_Mode parameter
247       Invalid pages parameter

Published Date: Feb 18, 2012