3B SetEcho¶
Validated MON 3B (3 decimal) · Mnemonic ECHOM · Group: Input and Output Monitor Calls (manual section 2.5)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_3B_SetEcho.c
Description¶
When you press a key on the terminal, a character is normally displayed. This is called echo. You modify a terminal's echo with this monitor call.
- If 8-bit I/O is set (TerminalFunction, function number 112), you will get echo always if bit 7 in the echo table is set.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
DeviceNumber |
INTEGER2 | In | The terminal's logical device number. See appendix B. Only needed for RT programs. Background programs ignore this parameter. The user's terminal is assumed. |
EchoStrategy |
INTEGER2 | In | Echo strategy: <0=No echo, 0=Echo all, 1=Echo except control chars, 2=MAC echo, 3-6=System defined, 7=User-defined table. |
Table |
INTEGER2[8] | In | User-defined echo table (128 bits for ASCII chars). Only used when EchoStrategy=7. Bit 0 means echo that character. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
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 |
|---|---|---|---|---|
| No | No | Yes | Yes | No |
Disagreement
The manual box says ND-100 and ND-500, but the yes/no fields say ND-100 = No, ND-500 = No. The manual box is the source.
Examples¶
From the manual (OCR text, not corrected).
INTEGER : DeviceNumber, EchoStrategy
INTEGER2ARRAY{0:7}
...
Monitor_Call('SetEcho', DeviceNumber, EchoStrategy, Table(0))
INTEGER DeviceNumber, EchoStrategy
INTEGER Table(8)
...
Monitor_Call('SetEcho', DeviceNumber, EchoStrategy, Table(1))
DeviceNumber, EchoStrategy : INTEGER2;
Table : RECORD...END;
...
SetEcho(DeviceNumber, EchoStrategy, Table);
01 DeviceNumber COMP.
01 EchoStrategy COMP.
01 Table.
02 array COMP OCCURS 8 TIMES.
...
MONITOR-CALL "SetEcho" USING DeviceNumber, EchoStrategy, Table.
DeviceNumber : W BLOCK 1
EchoStrategy : W BLOCK 1
Table : H BLOCK 8
SetEcho : EQU 37B9 + 3B
...
CALLG SetEcho, 3, DeviceNumber, EchoStrategy, Table
LDT DEVNO %Logical device number.
LDA STRAT %Echo strategy.
LDX (TABLE %Eight word large bit map.
MON 3 %Monitor call SetEcho.
...
DEVNO, ...
STRAT, ...
TABLE, ...
*+10/ %Make a buffer of 8 words.
ndmonlib implementation¶
Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.
| Handler | mon_3B_SetEcho |
| Code lines | 38 (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_3B_SetEcho.c |
| Last updated | 2026-07-17 |
Echo strategies¶
- Radix: decimal
- Note: The strategy codes as nd500x implements them (mon_terminal_state.h / mon_503B_InputString.c should_echo_char_ex). Strategies 3-6 are a documented gap - see unverified.
-
Codes
Code Name Description Status -1 ECHO_STRAT_NONE Negative = no echo; characters are not displayed. implemented 0 ECHO_STRAT_ALL Echo all characters. implemented 1 ECHO_STRAT_NO_CONTROL Echo except control characters. nd500x tests ch >= 32 && ch < 127. implemented 2 ECHO_STRAT_MAC MAC echo strategy - printable characters plus CR and LF. implemented 7 ECHO_STRAT_USER User-defined 128-bit table read from the Table parameter (4 x 32-bit words). implemented
Parameter notes¶
| Name | Note | Verified |
|---|---|---|
| Table | Read as 4 consecutive 32-bit words from arg_addresses[2] (128 bits) when strategy is 7. On ND-500 these are W, not H. | Yes |
| EchoStrategy | Read as a signed 32-bit word - the strategy is meaningfully negative. | Yes |
Verified¶
1. THE ECHO TABLE HAS INVERTED SEMANTICS FROM THE BREAK TABLE: bit = 0 means ECHO, bit = 1 means DO NOT echo. (The break table is the natural way round: bit = 1 means break.) This is a real trap - the two 128-bit tables look identical and are not.
| Field | Value |
|---|---|
| Evidence | nd500x/src/libmon/handlers/mon_503B_InputString.c should_echo_char_ex(): "INVERTED: bit=0 means echo, bit=1 means don't echo" -> return !bit_table_test_bit(user_table, ch); versus is_break_char_ex() -> return bit_table_test_bit(user_table, ch). |
2. The state 3B sets is REAL per-device state, consumed by the input calls: a later 503B DVINST / 511B DVIO with no per-call EchoStrat argument falls back to mon_get_echo_strategy(device).
| Field | Value |
|---|---|
| Evidence | mon_503B_InputString.c mon_dvinst_read(): echo_strat = (ctx->arg_count > 5) ? read arg 5 : mon_get_echo_strategy(device_no). |
Unverified¶
- STRATEGIES 3-6 (the manual's "system-defined tables") ARE NOT IMPLEMENTED. nd500x silently falls through to a PLACEHOLDER (echo all except control characters). The actual system tables are not in the scanned pages and no traced program selects 3-6.
- Strategy 8 ("last user-defined table") is handled for BREAK (4B/503B) but there is no ECHO_STRAT_LAST_USER path proven by any caller.
- The manual's note "If 8-bit I/O is set (TerminalFunction, function number 112), you will get echo always if bit 7 in the echo table is set" IS modelled in the 503B input path (should_echo_char_ex, eight_bit_io && ch >= 128 -> test bit 7), but the 8-bit I/O flag itself is never set by any traced program, so that path has never executed.
- NO OBSERVED CALLER. No traced program (NC, CAT-500, ND linker) issues 3B. Echo behaviour reaches the emulator instead through the per-call EchoStrat argument of 503B/511B.
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 441.