4B SetBreak¶
Validated MON 4B (4 decimal) · Mnemonic BRKM · Group: Input and Output Monitor Calls (manual section 2.5)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_4B_SetBreak.c
Description¶
Sets the break characters for a terminal. Normally, a program waits for input. When a break character is typed, the program restarts. For example, most subsystems restart when you press the RETURN-key after a command. The subsystems have defined the RETURN-key as a break character.
- SINTRAN III has some predefined break tables.
- You may define your own break table. This is a 128-bit array where each bit represents an ASCII character. Use 1 for the characters you want as break characters. The ability to define your own break tables is optional in older versions of SINTRAN III.
- If 8-bit I/O is set (TerminalFunction, function number 112), you will get break always if bit 7 in the break table is set.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
DeviceNo |
INTEGER | In | Logical device number. Only used by RT programs; background programs use own terminal. |
BreakStrategy |
INTEGER | In | Break strategy: <0=none, 0=all, 1=control chars, 2=MAC, 3-6=system, 7=user table, 8=last user, 9=max chars only. |
Table |
ARRAY | In | User-defined 128-bit break table (8 words). Only used with strategy 7. |
NoOfChar |
INTEGER | In | Maximum number of characters before break. Dummy for strategies 0, 1, 2. |
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 |
|---|---|---|---|---|
| Yes | Yes | No | No | No |
Examples¶
From the manual (OCR text, not corrected).
INTEGER : DeviceNo, Strategy, NoOfChar
INTEGER2ARRAY(0:7)
...
Monitor_Call('SetBreak', DeviceNo, Strategy, Table(0), NoOfChar)
INTEGER DeviceNo, Strategy, NoOfChar
INTEGER Table(8)
...
Monitor_Call('SetBreak', DeviceNo, Strategy, Table(1), NoOfChar)
DeviceNo, BreakStrategy, NoOfChar : INTEGER2;
Table : RECORD...END;
...
SetBreak(DeviceNo, BreakStrategy, Table, NoOfChar);
01 DeviceNo COMP.
01 BreakStrategy COMP.
01 NoOfChar COMP.
01 Table.
02 array COMP OCCURS 8 TIMES.
...
MONITOR-CALL "SetBreak" USING DeviceNo, BreakStrategy, Table, NoOfChar.
DeviceNo : W BLOCK 1
BreakStrategy : W BLOCK 1
NoOfChar : W BLOCK 1
Table : H BLOCK 8
SetBreak : EQU 37B9 + 4B
...
CALLG SetBreak, 4, DeviceNo, BreakStrategy, Table, NoOfChar
LDT DEVNO %Logical device number.
LDA NOCHR %Number of characters input before break,
COPY SA DD % only if STRAT greater or equal to 3.
LDX (TABLE %Address of 8-word large bit map.
LDA STRAT %Break strategy.
MON 4 %Monitor call SetBreak.
...
DEVNO, ...
STRAT, 1 %Break only on control characters.
TABLE, ...
*+10/ %Make an 8-word large buffer.
NOCHR, ...
ndmonlib implementation¶
Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.
| Handler | mon_4B_SetBreak |
| Code lines | 43 (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_4B_SetBreak.c |
| Last updated | 2026-07-17 |
Break strategies¶
- Radix: decimal
- Note: The strategy codes as nd500x implements them (mon_terminal_state.h and mon_503B_InputString.c is_break_char_ex). These same codes are what 503B DVINST and 511B DVIO accept as a per-call override.
-
Codes
Code Name Description Status -1 BREAK_STRAT_NONE Negative = no break; input continues until max chars or EOF. implemented 0 BREAK_STRAT_ALL Every character breaks. implemented 1 BREAK_STRAT_CONTROL Control characters (ch < 32) break. implemented 2 BREAK_STRAT_MAC MAC - CR, LF, ESC, EOF and 0x27 break. implemented 7 BREAK_STRAT_USER User-defined 128-bit table read from the Table parameter (4 x 32-bit words). implemented 8 BREAK_STRAT_LAST_USER Last user-defined table (do not resend the table); uses the device's stored table. implemented 9 BREAK_STRAT_MAX_ONLY No character breaks - only the NoOfChar count terminates input. implemented
Parameter notes¶
| Name | Note | Verified |
|---|---|---|
| Table | Read as 4 consecutive 32-bit words from arg_addresses[2] (128 bits) when strategy is 7. Stored to per-device state, so a later strategy-8 call can reuse it. | Yes |
| NoOfChar | Read from arg 3 as a 32-bit word when 4 or more CALLG args are present. | Yes |
Verified¶
1. The break table is the NATURAL way round - bit = 1 means BREAK - unlike the echo table, where bit = 0 means echo. Do not share code between them.
| Field | Value |
|---|---|
| Evidence | mon_503B_InputString.c is_break_char_ex() -> bit_table_test_bit(user_table, ch) versus should_echo_char_ex() -> !bit_table_test_bit(...). |
2. The state 4B sets is REAL per-device state consumed by the input calls: a 503B DVINST with no per-call BreakStrat argument falls back to mon_get_break_strategy(device).
| Field | Value |
|---|---|
| Evidence | mon_503B_InputString.c mon_dvinst_read(). |
3. A VALID TERMINAL LINE-INPUT BREAK TABLE ALWAYS BREAKS ON CR (0x0D). nd500x uses this as a sanity check to reject a mis-decoded table.
| Field | Value |
|---|---|
| Evidence | mon_503B_InputString.c: if a user-table strategy yields a table that does not break on CR, it is treated as invalid and the read falls back to MAC-style line breaks. This guard exists because the ND linker's 503B arg layout was mis-read positionally, producing a "table" that broke on the letter 'T' but not on CR, truncating every command at its first 'T'. Commit fc3ac5b. |
Unverified¶
- STRATEGIES 3-6 (the manual's "system-defined tables") ARE NOT IMPLEMENTED. nd500x silently falls through to a PLACEHOLDER that uses the MAC set (CR/LF/ESC/EOF/0x27). The real system tables are not in the scanned pages.
- NO OBSERVED CALLER of 4B itself. Break behaviour reaches the emulator through the per-call BreakStrat argument of 503B/511B instead. NC uses strategy 1.
- 8-bit I/O handling for characters >= 128 (test bit 7 of the user table) is coded but never executed - no traced program sets the 8-bit I/O flag.
Sources¶
| Doc | Note |
|---|---|
| SINTRAN III Monitor Calls (ND-860228.2 EN) | The manual body of this YAML. |
| nd500x/src/libmon/handlers/mon_503B_InputString.c | is_break_char_ex() - the strategy table as actually implemented, shared by 503B and 511B. |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 435.