EXOS 2.1 Constants

3. Error Codes

All EXOS calls return a status code which is zero to indicate success and negative to indicate that an error occured. Positive non­zero codes are warning codes and are not widely used by EXOS, indeed there is only one warning code produced by EXOS and it is included here.

In the documentation all error codes are referred to by there names which by convention begin with a full stop. The names are listed here along with the values and meanings. The strings inside double quotes are the error messages produced by by the EXOS explain error code function, where applicable. Those error codes which have no corresponding message are marked with an asterisk.

3.1 Warning Codes

07Fh .SHARE *
Shared segment allocated, only returned by an allocate segment call.

3.2 General Kernel Errors

0FFh .IFUNC "Invalid EXOS function code"

0FEh .ILLFN "EXOS function call not allowed"
This occurs for example if a device tries to open a channel, the user tries to allocate a channel buffer or an interrupt routine makes an EXOS call.

0FDh .INAME "Invalid EXOS string"
Occurs when an invalid character is detected in a device or filename, or the string is long.

0FCh .STACK "EXOS stack overflow"
Can occur from almost any EXOS call. Generally does not occur unless very deeply nested inside multiple devices.

0FBh .ICHAN "Channel does not exist"
Attempt to access a non­existent channel for reading, writing etc.

0FAh .NODEV "Device does not exist"
Attempt to open a channel to a non­existent device.

0F9h .CHANX "Channel exists"
Attempt to open a channel using a channel number is already open.

0F8h .NOBUF "No channel RAM allocated"
Occurs during an open channel if the device fails to make an allocate channel buffer call, or makes one with unreasonable parameters (more than 64K total RAM requested for example).

0F7h .NORAM "Insufficient memory"
Occurs if there is not enough free memory for an operation. Can occur with open channel, link device, load system extension or load new application.

0F6h .NOVID "Insufficient video memory"
Occurs when there is insufficient RAM available for an operation, but moving the channel buffers would cause a video channel to move out of video RAM.

0F5h .NOSEG *
No segment available when an allocate segment call is made

0F4h .ISEG *
Attempt to free a segment which is not allocated to the user or device. Also if attempt to set user boundary when there is no shared segment.

0F3h .IBOUND *
Attempt to set the user boundary above the EXOS boundary in the shared segment.

0F2h .IVAR "Unknown EXOS variable number"
Returned by read/write/toggle EXOS variable if the variable number is not recognised by the EXOS kernel or any system extension.

0F1h .IDESC "Invalid device descriptor"
Occurs if the device descriptor given to a link device EXOS call is invalid.

0F0h .NOSTR "Unrecognised command string"
Occurs if a string passed to a scan system extensions call is not recognised by any extension.

0EFh .ASCII "Invalid file header"
Occurs if the first byte of a file read by load module EXOS call is non­zero, or if the first two bytes are zero. Indicates that the file is not an Enterprise module format file.

0EEh .ITYPE "Unknown module type"
Occurs if the type of a module header read by load module is not recognised by EXOS or any system extension.

0EDh .IREL "Invalid relocatable module"
Occurs if an invalid bit stream is encountered by the load relocatable module call, or by the load module call if it is loading a relocatable system extension.

Returned by load module if it finds a module header of type $$EOF, or if it gets a .EOF error when trying to read the first byte of a module header. Indicates that the file has finished in a controlled manner.

0EBh .ITIME "Invalid date or time value"
Returned by set date or set time if the values given are not valid.

3.3 General Device Errors

These errors are generated by device drivers but are not specific to any particular device. They can be returned by any device where it seems appropriate.

0EAh .ISPEC "Invalid special function call"
Result from a special function call to a device wich does not recognise the given sub­function number.

0E9h .2NDCH "Device in use"
Attempt to open a channel to a device which only allows one channel, while there is already a channel open to it.

0E8h .IUNIT "Invalid unit number"
Returned by devices which interpret unit numbers if the unit number in an open or create channel call is unreasonable for that device.

0E7h .NOFN "Call not supported by this device"
Not all devices support all the EXOS channel calls (function codes 1..11). This is the error returned if for example an attempt is made to write to a keyboard channel.

0E6h .ESC "Invalid escape sequence"
Several devices interpret escape sequences to control various functions. If one of these devices receives an escape sequence wich it doesn't understand then it returns this error.

0E5h .STOP "STOP key pressed"
This error is returned by device if it aborts its current operation to service a STOP key software interrupt. The software interrupt will have occured before the user gets this error code.

0E4h .EOF "End of file"
Returned by any file device if an attempt is made to read beyond the end of a file.

0E3h .PROT "Protection violation"
Allows devices to provide some sort of file protection. The only built in device which supports this is the cassette driver.

3.4 Device Specific Errors

The following errors are generally specific to a single device driver and are only returned by that one device. Full explanations of the error codes can be found in the individual device driver specifications.


0E2h .KFSPC "Function key string too long"


0E1h .SENV "Envelope too big"
0E0h .SENBF "Envelope storage full"
0DFh .SQFUK "Sound queue full"


0DEh .VSIZE "Invalid video page size"
0DDh .VMODE "Invalid video mode"
0DCh .VDISP "Invalid display parameters"
0DBh not used
0DAh .VROW "Invalid row number to scroll"
0D9h .VCURS "Invalid cursor coordinates"
0D8h .VBEAM "Invalid beam position"


0D7h .SEROP "Cannot use both serial and network"


0D7h .SEROP "Cannot use both serial and network"
0D6h .NOADR "Network address not set"
0D5h .NETOP "Network link exists"


0D9h .VCURS "Invalid cursor coordinates"
0D4h .EVID "Editor video channel error"
0D3h .EKEY "Editor keyboard channel error"
0D2h .EDINV "Editor load file error"
0D1h .EDBUF "Editor load file too big"


0D0h .CCRC "Cassette CRC error"

Next Chapter: EXOS Variable Numbers.

David Bouman. (dsbouma@cs.vu.nl)