142B ToErrorDevice¶
Validated MON 142B (98 decimal) · Mnemonic ERMON · Group: Input and Output Monitor Calls (manual section 2.5)
Available from: RT programs (manual compatibility box)
Emulation source: src/handlers/mon_142B_ToErrorDevice.c
Description¶
Outputs a user-defined, real-time error. The error message is output on the error device, i.e. normally the console. The following is an example of such a message: 23.10.59 ERROR 59 AT XPROG AT 134562, USER ERROR, SUBERROR 4. See appendix A.
Notes¶
- The real-time errors numbers 50-69 can be used in this way.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
ErrorNumber |
INTEGER | In | Error number (50-69). This number is output following ERROR. |
SubErrorNumber |
INTEGER | In | Suberror number. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
WarningMessage, ErrorMessage, and OutMessage
Compatibility¶
| Machines | Users | Programs |
|---|---|---|
| ND-100 and ND-500 | User RT and user SYSTEM | RT programs |
The manual's compatibility box for this call, word for word.
Yes/no fields from the YAML extraction (not in the manual's words):
| ND-100 | ND-500 | User programs | RT programs | System programs |
|---|---|---|---|---|
| Yes | Yes | Yes | Yes | No |
Examples¶
From the manual (OCR text, not corrected).
INTEGER : ErrorNumber, SubErrorNumber
...
Monitor_Call('ToErrorDevice', ErrorNumber, SubErrorNumber)
INTEGER ErrorNumber, SubErrorNumber
...
Monitor_Call('ToErrorDevice', ErrorNumber, SubErrorNumber)
ErrorNumber, SubErrorNumber : INTEGER2;
...
ToErrorDevice(ErrorNumber, SubErrorNumber);
01 ErrorNumber COMP.
01 SubErrorNumber COMP.
...
MONITOR-CALL "ToErrorDevice" USING ErrorNumber, SubErrorNumber.
ErrorNumber : W BLOCK 1 %In ASCII characters.
SubErrorNumber : W BLOCK 1
ToErrorDevice : EQU 378B9 + 142B
...
CALLG ToErrorDevice, 2, ErrorNumber, SubErrorNumber
LDA ERRNO %Error number.
LDT SUBER %Sub-error number.
MON 142 %Monitor call ToErrorDevice.
...
ERRNO, ... %Error number as two ASCII characters.
SUBER, ... %Suberror number as two ASCII characters.
ndmonlib implementation¶
Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.
| Handler | mon_142B_ToErrorDevice |
| Code lines | 22 (non-blank, non-comment lines in the file) |
Notes from the handler source¶
src/handlers/mon_142B_ToErrorDevice.c line 40
Output error message to stderr (error device/console)
Format similar to SINTRAN: "HH.MM.SS ERROR nn, USER ERROR, SUBERROR m"
Numbers in octal format per SINTRAN convention
Emulation research¶
Source
This section comes from the emulation: block of the call's YAML file in the NDInsight repo. It records what was learned while implementing the call in nd500x; its status is nd500x's, not ndmonlib's.
| Status (nd500x) | partial |
| nd500x handler | nd500x/src/libmon/handlers/mon_142B_ToErrorDevice.c |
| Last updated | 2026-07-17 |
Note¶
The handler formats and prints a message, then returns success - the program continues, as the manual requires. But it prints to the HOST's stderr with fprintf, not to an emulated SINTRAN error device, and the format is a reduced version of the manual's.
Parameter notes¶
1. ErrorNumber / SubErrorNumber
| Field | Value |
|---|---|
| Note | On ND-500 both are 32-bit words (W BLOCK), read with mon_read_param_word. The manual types them INTEGER for the ND-100 16-bit form. Both are IN parameters; this call has no output. |
| Verified | Yes |
2. ErrorNumber
| Field | Value |
|---|---|
| Note | The manual restricts it to 50-69. nd500x does NOT range-check it and prints whatever it is given. |
| Verified | Yes |
Return contract¶
- Success: K flag cleared; message emitted. The program is not terminated.
- Errors
Verified¶
1. MON 142B dispatches via MCTAB to the L07 worker ERRMO.
| Field | Value |
|---|---|
| Evidence | Carve L-VSX-500 142B-ToErrorDevice/README.md CORRECTED header: MCTAB[142B] slot 005762B (segment 044-S3IDPIT, byte offset 2020) = 071776B = ERRMO. Reproduced: dd if=044-S3IDPIT.bin bs=1 skip=2020 count=2 -> 73 fe. |
2. The timestamp is routed through the pinnable MON clock.
| Field | Value |
|---|---|
| Evidence | Commit 4fa340a: "113B CLOCK and 142B error timestamps -> fixed UTC instant (gmtime) when pinned". With ND500X_PIN_CLOCK the 142B header time is reproducible. |
Unverified¶
- THE OUTPUT FORMAT IS NOT THE MANUAL'S. The manual's example is "23.10.59 ERROR 59 AT XPROG AT 134562, USER ERROR, SUBERROR 4"; nd500x prints "HH.MM.SS ERROR nnB, USER ERROR, SUBERROR mB" - it omits the "AT <program> AT <address>" clause entirely and appends a "B" octal suffix that the manual's example does not show. No program has been observed parsing this output.
- THE RADIX IS A GUESS. nd500x prints both numbers with %o (octal). The manual's example shows "ERROR 59" and "SUBERROR 4" with the documented range 50-69 - which reads as decimal. Nothing settles which the real error device emits.
- DESTINATION. nd500x writes to the host process's stderr, bypassing the emulated console/device layer entirely. The manual says "the error device, i.e. normally the console". A guest that had redirected its error device would not see any difference.
- NO WORKER BODY. The carve records no ND-100 worker body isolated for this call: the row reads "to-error-device worker body | - (not isolated) | ... | ERMON (ND-500 only) | body MISATTRIBUTED (name only)". Only the MCTAB slot value (ERRMO=071776B) is byte-proven. The README's own body text and its correction header disagree; the header is the byte-verified one.
- The handler does not check arg_count and does not null-check the tm result before dereferencing it.
Sources¶
| Doc | Note |
|---|---|
| NDInsight/tools/sintran-segment-carver/versions/L-VSX-500/re/mon-analysis/142B-ToErrorDevice/README.md | MCTAB[142B] = ERRMO = 071776B (byte-proven); no worker body isolated. |
| nd500x/src/libmon/mon_clock.c | The pinnable clock behind the 142B timestamp (commit 4fa340a). |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 543.