Skip to content

143B ExecutionInfo

Validated   MON 143B (99 decimal) · Mnemonic RSIO · Group: Monitor Calls for Terminal Handling (manual section 2.6)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_143B_ExecutionInfo.c

Description

Gets information about the execution of the calling program. You are told whether the program executes interactively, as a batch or mode job, or as an RT program. The monitor call returns some additional information for non-RT programs, consisting of the command input file, the command output file, and the directory index and user index of the program's owner.

Notes

  • Your terminal number is returned as the command input and output files in interactive programs.
  • Execution mode.
  • 0 means interactive program
  • 1 means batch job
  • 2 means mode job
  • 3 means RT program
  • Logical device number for command input. This is your terminal number for interactive programs. Batch and mode jobs return the file number of the command input file. Not used for RT programs.
  • Logical device number for command output. This is your terminal number for interactive programs. Batch and mode jobs return the file number of the command output file. Not used for RT programs.
  • Directory and user index of the program's owner. On the ND-100, the Directory Index is the uppermost 8 bits and the User Index is the lowermost 8 bits. On the ND-500, the Directory Index is the uppermost 8 bits of the lowermost halfword. i.e. bits 8-15, and the User Index is the lowermost 8 bits, i.e. bits 0-7, (the uppermost halfword, bits 16-31, is zero - i.e. all bits are cleared). Not used for RT programs.
  • Standard Error Code. See appendix A.

Parameters

Name Type Direction Description
ExecutionMode INTEGER Out Execution mode:
0 = interactive program
1 = batch job
2 = mode job
3 = RT program
InputDev INTEGER Out Logical device number for command input. Terminal number for interactive, file number for batch/mode.
OutputDev INTEGER Out Logical device number for command output. Terminal number for interactive, file number for batch/mode.
UserIndex INTEGER Out Directory and user index of program's owner. Bits 8-15=directory index, bits 0-7=user index.

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

Compatibility

Machines Users Programs
ND-100 and ND-500 All users All 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 ExecutionMode, InputDev, OutputDev, UserIndex
Monitor_Call('ExecutionInfo', ExecutionMode, InputDev,
             OutputDev, UserIndex)
C IF (ErrCode .NE. 0) THEN ...
ExecutionMode, InputDev, OutputDev, UserIndex : INTEGER2;
...
ExecutionInfo(ExecutionMode, InputDev, OutputDev, UserIndex);
IF ErrCode <> 0 THEN ...
01 ExecutionMode COMP.
01 InputDev COMP.
01 OutputDev COMP.
01 UserIndex COMP.
01 ErrCode COMP.
...
MONITOR-CALL "ExecutionInfo" USING ExecutionMode, InputDev,
              OutputDev, UserIndex.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
ExecutMode  : W BLOCK 1
InputDev    : W BLOCK 1
OutputDev   : W BLOCK 1
UserIndex   : W BLOCK 1
ExecutionInfo : EQU 37B9 + 143B
...
    CALLG ExecutionInfo, 4, ExecutMode, InputDev, OutputDev, UserIndex
| MON  | 143  | %Monitor call ExecutionInfo.                    |
|------|------|-----------------------------------------------|
| STA  | EXMOD| %Store execution mode.                        |
| STT  | IFILE| %Store file number of command input file.     |
| COPY | SD DA|                                               |
| STA  | OFILE| %Store file number of command output file.    |
| STX  | INDEX| %Store directory and user indexes.            |
| ...  |      |                                               |


EXMOD, 0
IFILE, 0
OFILE, 0
INDEX, 0

ndmonlib implementation

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

Handler mon_143B_ExecutionInfo
Code lines 34 (non-blank, non-comment lines in the file)

Notes from the handler source

src/handlers/mon_143B_ExecutionInfo.c line 32

Default execution environment settings.

INPUT DEV = 1 (the TERMINAL), changed 2026-07-16 - previously 0.

Its own documented contract (above) says InputDev is the "Terminal number for
interactive, file number for batch/mode". We report ExecutionMode = 0
(interactive) and OutputDev = 1 (terminal), so InputDev = 0 (the SINTRAN
command buffer = the BATCH channel) was self-inconsistent: it told an
interactive program to take its commands from the batch channel.

Byte-verified consequence of the old value: the ND LINKER believed its command
input was device 0, issued 1B INBT on it, found it empty and blocked forever.
Feeding device 0 instead forced it into its BATCH dialogue ("Batch abortion
(Yes,No)Yes") where it spun without ever consuming the fed commands.

COUPLED CHANGE - do not ship this alone: with InputDev = 1 the linker takes
its interactive path and immediately calls MON 511B DVIO. Before 511B existed
that traded a hang for an unimplemented-MON stop, which is why this was probed
and REVERTED twice (2026-07-15). It lands only together with
handlers/mon_511B_DVIO.c.

src/handlers/mon_143B_ExecutionInfo.c line 65

Set up execution environment values
For the emulator, we simulate an interactive program environment.
This allows programs to read from the command buffer via InByte(0).

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

Note

Returns a fixed, self-consistent interactive environment. The values are constants - nd500x has no batch processor, no login and no real terminal numbering - but WHICH constants took two reverted attempts and a coupled change to get right. See the InputDev note.

Parameter notes

1. ExecutionMode / InputDev / OutputDev / UserIndex

Field Value
Note ALL FOUR ARE OUT PARAMETERS - this call has no input at all, and its OUT parameters ARE its contract. OUT-PARAMETER DEFECT CLASS: a handler that returns SUCCESS without writing them leaves the caller acting on stale memory, and the failure surfaces tens of thousands of instructions later somewhere unrelated. Confirmed instances of exactly this bug elsewhere: 412B FSCNT (fixed, commit 73ac594) and 144B MAGTP function 0 (fixed, commit 6ad9c09). nd500x writes each one, guarded by arg_count.
Verified Yes

2. ExecutionMode / InputDev / OutputDev / UserIndex

Field Value
Note On ND-500 each is a 32-bit word (W BLOCK), written with mon_write_param_word. On ND-100 INTEGER is a 16-bit halfword.
Verified Yes

3. InputDev

Field Value
Note THE EXPENSIVE ONE. nd500x reports 1 (the TERMINAL), changed 2026-07-16; it previously reported 0 (the SINTRAN command buffer = the batch channel), which was self-inconsistent: it told a program reported as INTERACTIVE to take its commands from the batch channel, while the manual's own text says InputDev is the "terminal number for interactive, file number for batch/mode". COUPLED CHANGE - do not ship it alone: with InputDev=1 the linker takes its interactive path and immediately calls MON 511B DVIO. Before 511B existed that traded a hang for an unimplemented-MON stop, which is why this was probed and REVERTED TWICE (2026-07-15). It lands only together with handlers/mon_511B_DVIO.c (commit 2d9b00f).
Verified Yes

4. UserIndex

Field Value
Note Bits 8-15 = directory index, bits 0-7 = user index. nd500x packs (DIRECTORY_INDEX << 8) | USER_INDEX with both = 1, giving 257 decimal = 401 octal.
Verified Yes

Observed calls

1. ND linker (linker-b01.dom); also nd500x default for every caller

Field Value
Params
Expectation Returns mode=0 (interactive), input=1, output=1, user_idx=401 octal. Observed. IMPORTANT READING NOTE: the linker later asks a CONFIG QUESTION "Batch abortion (Yes,No)" during its startup dialogue. That is a configuration prompt, NOT evidence that it is running as a batch job - RSIO has already told it, and it accepts, that it is interactive. Do not "fix" RSIO to report batch on the strength of that prompt.
Note nd500x MON log line: "OUT: mode=0, input=1, output=1, user_idx=401".

2. CAT-500 code generator (cat-cat5-b06.dom), startup

Field Value
Params
Expectation Part of CAT-500's fixed startup sequence (11B TIME, 114B TUSED, 143B RSIO, 422B GSWSP, 41B ROBJE, 76B SETBS, 62B RMAX, 73B SMAX, 504B DVOUTS, 503B DVINST); it then prints its banner and reads commands via 503B DVINST.
Note Source: nd500x/docs/CAT500_UECOM_CSHARP_HANDOFF.md Part C.

Return contract

  • Success: K flag cleared; up to 4 words written, as many as arg_count allows.
  • Errors

Verified

1. MON 143B dispatches via MCTAB to the L07 worker RSIO in segment 003-S3CP.

Field Value
Evidence Carve L-VSX-500 143B-ExecutionInfo/README.md: MCTAB slot (segment 044-S3IDPIT, byte offset 2022) = 051430B = RSIO; the worker is carved in 003-S3CP alongside its siblings GBGSZ / MBECH. Reproduced: dd if=044-S3IDPIT.bin bs=1 skip=2022 count=2 -> 53 18.

2. InputDev=0 byte-provably breaks the ND linker.

Field Value
Evidence With InputDev=0 the linker believed its command input was device 0, issued 1B INBT on it, found it empty and blocked forever. Feeding device 0 instead forced it into its BATCH dialogue ("Batch abortion (Yes,No)Yes") where it spun without ever consuming the fed commands. Recorded in the handler header and commit 2d9b00f.

3. With InputDev=1 the linker reaches real terminal I/O.

Field Value
Evidence Commit 2d9b00f, runtime: "511B DVIO: DeviceNo=1, OutBytes=2, OutBuf=0xB0049430, MaxNo=12, InBuf=0xB0001C2E; 504B DVOUTS wrote 2 bytes; 503B DVINST read 12 bytes; EXIT -> SUCCESS".

Unverified

  • Every returned value is a CONSTANT, not a query. ExecutionMode is always 0 (never 1 batch, 2 mode job, or 3 RT), OutputDev always 1, UserIndex always 401 octal. There is no mechanism by which nd500x could report anything else, so a program that branches on batch/RT mode has never exercised those paths.
  • The DIRECTORY_INDEX=1 / USER_INDEX=1 values are invented defaults. The handler comments them "Default user (SYSTEM or RT)" - which of the two is not established. Nothing observed reads the field.
  • The RSIO worker body is carved but was not decoded for this note, so the real source of each field (which SINTRAN datafield the values come from) is unread.
  • A stale comment survives in the handler: line 71 still reads "input_dev = DEFAULT_INPUT_DEV; / Input device 0 /" while the constant is 1. The constant, not the comment, is what runs.

Discrepancies

1. Earlier carve version located the worker via a fictional level-14 GOTAB/F1670 compiler stub and read RSIO from SINTRAN-DATA_commoncode.

Field Value
Is MON calls dispatch through MCTAB @ 005620B (segment 044-S3IDPIT); GOTAB is MFELL for 224 of 256 calls. MCTAB[143B] = 051430B = RSIO, carved in 003-S3CP.
Evidence Carve CORRECTED 2026-07-13 header; dd if=044-S3IDPIT.bin bs=1 skip=2022 count=2 -> 53 18.

2. The linker's "Batch abortion (Yes,No)" prompt was read as evidence that the linker considered itself a batch job, motivating an RSIO change.

Field Value
Is It is a CONFIG QUESTION in the linker's startup dialogue. RSIO already reports interactive (mode=0) and the linker accepts that; the prompt is unrelated to execution mode.
Evidence Observed 2026-07-17 with mode=0/input=1/output=1/user_idx=401 in force; commit 2d9b00f records that feeding the batch channel merely made it spin.

Sources

Doc Note
NDInsight/tools/sintran-segment-carver/versions/L-VSX-500/re/mon-analysis/143B-ExecutionInfo/README.md MCTAB[143B] = RSIO = 051430B, worker carved in 003-S3CP.
nd500x/src/libmon/handlers/mon_511B_DVIO.c The coupled change: RSIO InputDev=1 is useless without 511B DVIO (commit 2d9b00f).

Source

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