Skip to content

32B OutMessage

Validated   MON 32B (26 decimal) · Mnemonic MSG · Group: File Operations (manual section 2.4)

Available from: Background programs (manual compatibility box)

Emulation source: src/handlers/mon_32B_OutMessage.c

Description

Writes a message to the user's terminal. This is convenient for error messages in background programs.

Notes

  • The maximum string length is 512 characters.
  • Appendix F contains an ASCII table.

Parameters

Name Type Direction Description
Message STRING In String message to write to user's terminal (max 512 characters).

Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.

See also

OutUpTo8Bytes, Out8Bytes, OutString, OutputString, OutNumber, and OutByte

Compatibility

Machines Users Programs
ND-100 and ND-500 All users Background 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 No No No

Examples

From the manual (OCR text, not corrected).

BYTES : Message(0:79)
...
Monitor_Call('OutMessage', Message)
CHARACTER Message*80
...
Monitor_Call('OutMessage', Message(1:80))
Message : PACKED ARRAY [0..79] OF CHAR;
...
OutMessage(Message);
01 Message PIC X(100).
...
MONITOR-CALL "OutMessage" USING Message.
| Message                | STRINGDATA 'This is a test...' | %Message to be sent.        |
|------------------------|--------------------------------|-----------------------------|
| OutMessage             | EQU 37B9 + 32B                 |                             |
| CALLG OutMessage, 1, Message |                          |                             |
LDX  (TEXT     %Address string to be sent to user's terminal.
MON  32        %Monitor call OutMessage.
...
TEXT, 'THIS IS A TEXT'  %String to be written.

ndmonlib implementation

Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.

Handler mon_32B_OutMessage
Code lines 32 (non-blank, non-comment lines in the file)

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) implemented
nd500x handler nd500x/src/libmon/handlers/mon_32B_OutMessage.c
Last updated 2026-07-17

Parameter notes

1. Message

Field Value
Note Read as an ND-500 [Length:4][Pointer:4] DESCRIPTOR via mon_read_descriptor_string(), NOT as an inline string. This is the Pascal/FORTRAN calling convention. Capped at 512 characters.
Verified Yes

Verified

1. 32B takes a descriptor, not an inline string, and an auto-detecting reader is the wrong tool for the job.

Field Value
Evidence Commit e54507d removed the unsafe auto-detect mon_read_string() and made every caller declare its format explicitly, because auto-detection "could misinterpret memory patterns". 32B was moved to mon_read_descriptor_string; 12B, 256B, 317B and 54B were moved to mon_read_sintran_string (0x00/0x27/0xFF terminated). The same descriptor mistake was later found and fixed independently in 317B UECOM (commit 15ca5e9 - the direct read saw the descriptor struct's first byte 0x00 and produced "") and in 12B SETCM (commit b615586). If a MON string comes out EMPTY, suspect the descriptor first.

2. SINTRAN messages already carry their own CR/LF terminators; the handler must not add any.

Field Value
Evidence mon_32B_OutMessage.c: "Note: SINTRAN messages already contain \r\n terminators, don't add extra" - the handler writes exactly the len bytes it read.

Unverified

  • NO OBSERVED CALLER. No traced program (NC, CAT-500, ND linker) issues 32B. Implemented but NOT proven end to end.
  • The 512-character cap is nd500x's own MAX_MESSAGE_LEN, matching the handler's header note "max 512 characters". The scanned manual body in this YAML does not state a maximum, so the limit is NOT confirmed from a primary source.
  • 32B is documented as writing to "the user's terminal" specifically. nd500x routes it to the single console with no device selection - there is no per-user terminal concept to get wrong yet.
  • The handler never fails except on a missing argument: a descriptor that reads as length 0 writes nothing and still returns success.

Sources

Doc Note
SINTRAN III Monitor Calls (ND-860228.2 EN) The manual body of this YAML.

Source

SINTRAN III Monitor Calls (ND-860228.2 EN), page 379.