Diagnostics and status codes
Exact message text, return codes and practical interpretation.
Reading diagnostics
Shell diagnostics are in English. The table preserves the displayed strings and explains their meaning. BASIC normally reports BASIC @ line code; its line value is the BASIC line number, including automatically assigned numbers, not necessarily the physical file line.
The shell has no $? variable. WAIT prints a worker’s stored exit result; most commands print only an error message when needed. A missing unregistered command token is tried as an executable path, so a typo can produce NOT FOUND rather than UNKNOWN COMMAND.
BASIC runtime cancellation returns code 130 without the usual BASIC error banner. Some low-level errors, including a rejected WAIT, use the shared status values below.
Status summary
| Code | Displayed text / form | Meaning |
|---|---|---|
| 0 | — | Success. |
| 1 | I/O ERROR | Controller/transfer error; also an incomplete writer close or rejected native sleep. |
| 2 | WRITE VERIFICATION FAILED | A write could not be verified by rereading. |
| 3 | VOLUME UNFORMATTED/ABSENT | No valid supported MKS2 header; absent/unformatted or incompatible volume. |
| 4 | CORRUPT FILESYSTEM/DATA | Invalid metadata or a file-data checksum failure. |
| 5 | READ ONLY | The target device is read-only or protected. |
| 6 | NOT FOUND | The requested file, directory or path was not found. |
| 7 | NO SPACE OR FREE INODES | No suitable free extent or inode. |
| 8 | INVALID ARGUMENTS/NAME | Invalid argument, filename, handle or PID. |
| 9 | IS A DIRECTORY | A directory was supplied where a regular file was required. |
| 10 | NOT A DIRECTORY | A path component is not a directory. |
| 11 | ALREADY EXISTS | The target already exists for an operation requiring a new name. |
| 12 | DIRECTORY NOT EMPTY | RMDIR target contains children. |
| 13 | ROM ERR @ | ROM resource/module/addressing validation failed; a location may follow. |
| 14 | DEVICE ABSENT/NOT MOUNTED | Device has no driver or volume is not mounted. |
| 15 | PATH BUSY | Busy resource, disallowed owner, protected current path or no free task slot. |
| 16 | SAVE: OPEN EDIT WITH A PATH | Unnamed editor buffer: reopen EDIT with a pathname to save. |
| 17 | LBA OUTSIDE DEVICE | Logical block address is outside device bounds. |
| 18 | NOT A REGULAR FILE | Unsupported special path or non-regular-file operation. |
| 19 | UNKNOWN COMMAND | Unknown registered command, for example an invalid HELP topic. |
| 20 | FILE TOO LARGE FOR EDIT | The file exceeds the 1,280-byte editor limit. |
| 21 | BROKEN PIPE | EPIPE: the pipe reader has closed. |
| 22 | PIPE: INVALID SYNTAX/COMMAND | Invalid pipeline syntax, producer or consumer. |
| 32 | BASIC @ line 32 | Syntax error, unsupported word, duplicate/non-increasing line number or NUL in source. |
| 33 | BASIC @ line 33 | Compiler limit exceeded: literal, line table, expression depth, code length or related bound. |
| 34 | BASIC @ line 34 | GOTO/GOSUB/THEN destination line is absent. |
| 35 | BASIC @ line 35 | Invalid MBX header, opcode, variable index, fetch/branch bound or device argument. |
| 36 | BASIC @ line 36 | Invalid or exhausted operand/control stack; mismatched NEXT/RETURN. |
| 37 | BASIC @ line 37 | Division by zero, STEP 0 or invalid mathematical argument. |
| 38 | BASIC @ line 38 | Data-file state error or GET beyond EOF. |
| 39 | BASIC @ line 39 | Array not dimensioned, repeated DIM, invalid bound/index or exhausted array capacity. |
| 40 | BASIC @ line 40 | READ exhausted the numeric DATA stream. |
| 130 | — | Cancellation/termination: SU+C in BASIC or KILL result for a worker. |
Status 0
Success.
Status 1
I/O ERROR: Controller/transfer error; also an incomplete writer close or rejected native sleep.
Status 2
WRITE VERIFICATION FAILED: A write could not be verified by rereading.
Status 3
VOLUME UNFORMATTED/ABSENT: No valid supported MKS2 header; absent/unformatted or incompatible volume.
Status 4
CORRUPT FILESYSTEM/DATA: Invalid metadata or a file-data checksum failure.
Status 5
READ ONLY: The target device is read-only or protected.
Status 6
NOT FOUND: The requested file, directory or path was not found.
Status 7
NO SPACE OR FREE INODES: No suitable free extent or inode.
Status 8
INVALID ARGUMENTS/NAME: Invalid argument, filename, handle or PID.
Status 9
IS A DIRECTORY: A directory was supplied where a regular file was required.
Status 10
NOT A DIRECTORY: A path component is not a directory.
Status 11
ALREADY EXISTS: The target already exists for an operation requiring a new name.
Status 12
DIRECTORY NOT EMPTY: RMDIR target contains children.
Status 13
ROM ERR @ : ROM resource/module/addressing validation failed; a location may follow.
Status 14
DEVICE ABSENT/NOT MOUNTED: Device has no driver or volume is not mounted.
Status 15
PATH BUSY: Busy resource, disallowed owner, protected current path or no free task slot.
Status 16
SAVE: OPEN EDIT WITH A PATH: Unnamed editor buffer: reopen EDIT with a pathname to save.
Status 17
LBA OUTSIDE DEVICE: Logical block address is outside device bounds.
Status 18
NOT A REGULAR FILE: Unsupported special path or non-regular-file operation.
Status 19
UNKNOWN COMMAND: Unknown registered command, for example an invalid HELP topic.
Status 20
FILE TOO LARGE FOR EDIT: The file exceeds the 1,280-byte editor limit.
Status 21
BROKEN PIPE: EPIPE: the pipe reader has closed.
Status 22
PIPE: INVALID SYNTAX/COMMAND: Invalid pipeline syntax, producer or consumer.
Status 32
BASIC @ line 32: Syntax error, unsupported word, duplicate/non-increasing line number or NUL in source.
Status 33
BASIC @ line 33: Compiler limit exceeded: literal, line table, expression depth, code length or related bound.
Status 34
BASIC @ line 34: GOTO/GOSUB/THEN destination line is absent.
Status 35
BASIC @ line 35: Invalid MBX header, opcode, variable index, fetch/branch bound or device argument.
Status 36
BASIC @ line 36: Invalid or exhausted operand/control stack; mismatched NEXT/RETURN.
Status 37
BASIC @ line 37: Division by zero, STEP 0 or invalid mathematical argument.
Status 38
BASIC @ line 38: Data-file state error or GET beyond EOF.
Status 39
BASIC @ line 39: Array not dimensioned, repeated DIM, invalid bound/index or exhausted array capacity.
Status 40
BASIC @ line 40: READ exhausted the numeric DATA stream.
Status 130
Cancellation/termination: SU+C in BASIC or KILL result for a worker.
Boot and fatal messages
| Message | Interpretation |
|---|---|
| ROM ERR >8K | Extended resident load/check failed. The recovery path in the verified prefix stops; check the programmed image and cartridge addressing. |
| KEYBOARD BUS ERROR / RESTART MK90 | Keyboard/shared-controller failure; the system has stopped and requests restart. |
| STACK ERR / RESTART | Shared shell/foreground stack check failed; the system has stopped. |
| RTC UNAVAILABLE | RTC sampling failed to obtain a stable value within its bounded retry loop. |
Diagnostic cases
| Observation | What to check |
|---|---|
| ROMTEST milestones pass but MOUNT fails | ROM addressing is separate from data format. Is the data cartridge MKS2, with a valid header and metadata? |
| DEVICES shows RW but access fails | RW describes the driver flags. It does not prove presence or capacity of the cartridge. |
| CP/MBC reports space exhausted despite a small output | Replacement uses a new contiguous extent; both metadata generations and open readers can retain older sectors. |
| Pipeline reports busy | One of background slots 1/2 is required by its consumer. Check PS and stop or wait for a worker. |
| FK inserts a word which MBC rejects | The editor includes factory legends; only the documented MBC-16 subset compiles. |
| RND restarts with the same sequence | The runtime deliberately starts its pseudorandom seed at 1 each execution. |
| Long WAIT does not stop immediately on SU+C | Cancellation is checked at runtime polling/input points, not within the sleep deadline wait. |