mk90.guide

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

CodeDisplayed text / formMeaning
0—Success.
1I/O ERRORController/transfer error; also an incomplete writer close or rejected native sleep.
2WRITE VERIFICATION FAILEDA write could not be verified by rereading.
3VOLUME UNFORMATTED/ABSENTNo valid supported MKS2 header; absent/unformatted or incompatible volume.
4CORRUPT FILESYSTEM/DATAInvalid metadata or a file-data checksum failure.
5READ ONLYThe target device is read-only or protected.
6NOT FOUNDThe requested file, directory or path was not found.
7NO SPACE OR FREE INODESNo suitable free extent or inode.
8INVALID ARGUMENTS/NAMEInvalid argument, filename, handle or PID.
9IS A DIRECTORYA directory was supplied where a regular file was required.
10NOT A DIRECTORYA path component is not a directory.
11ALREADY EXISTSThe target already exists for an operation requiring a new name.
12DIRECTORY NOT EMPTYRMDIR target contains children.
13ROM ERR @ ROM resource/module/addressing validation failed; a location may follow.
14DEVICE ABSENT/NOT MOUNTEDDevice has no driver or volume is not mounted.
15PATH BUSYBusy resource, disallowed owner, protected current path or no free task slot.
16SAVE: OPEN EDIT WITH A PATHUnnamed editor buffer: reopen EDIT with a pathname to save.
17LBA OUTSIDE DEVICELogical block address is outside device bounds.
18NOT A REGULAR FILEUnsupported special path or non-regular-file operation.
19UNKNOWN COMMANDUnknown registered command, for example an invalid HELP topic.
20FILE TOO LARGE FOR EDITThe file exceeds the 1,280-byte editor limit.
21BROKEN PIPEEPIPE: the pipe reader has closed.
22PIPE: INVALID SYNTAX/COMMANDInvalid pipeline syntax, producer or consumer.
32BASIC @ line 32Syntax error, unsupported word, duplicate/non-increasing line number or NUL in source.
33BASIC @ line 33Compiler limit exceeded: literal, line table, expression depth, code length or related bound.
34BASIC @ line 34GOTO/GOSUB/THEN destination line is absent.
35BASIC @ line 35Invalid MBX header, opcode, variable index, fetch/branch bound or device argument.
36BASIC @ line 36Invalid or exhausted operand/control stack; mismatched NEXT/RETURN.
37BASIC @ line 37Division by zero, STEP 0 or invalid mathematical argument.
38BASIC @ line 38Data-file state error or GET beyond EOF.
39BASIC @ line 39Array not dimensioned, repeated DIM, invalid bound/index or exhausted array capacity.
40BASIC @ line 40READ 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

MessageInterpretation
ROM ERR >8KExtended resident load/check failed. The recovery path in the verified prefix stops; check the programmed image and cartridge addressing.
KEYBOARD BUS ERROR / RESTART MK90Keyboard/shared-controller failure; the system has stopped and requests restart.
STACK ERR / RESTARTShared shell/foreground stack check failed; the system has stopped.
RTC UNAVAILABLERTC sampling failed to obtain a stable value within its bounded retry loop.

Diagnostic cases

ObservationWhat to check
ROMTEST milestones pass but MOUNT failsROM addressing is separate from data format. Is the data cartridge MKS2, with a valid header and metadata?
DEVICES shows RW but access failsRW describes the driver flags. It does not prove presence or capacity of the cartridge.
CP/MBC reports space exhausted despite a small outputReplacement uses a new contiguous extent; both metadata generations and open readers can retain older sectors.
Pipeline reports busyOne 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 rejectsThe editor includes factory legends; only the documented MBC-16 subset compiles.
RND restarts with the same sequenceThe runtime deliberately starts its pseudorandom seed at 1 each execution.
Long WAIT does not stop immediately on SU+CCancellation is checked at runtime polling/input points, not within the sleep deadline wait.