Skip to content

35B OutNumber

In progress   MON 35B (29 decimal) · Mnemonic IOUT · Group: File Operations (manual section 2.4)

Available from: Background programs (manual compatibility box)

Emulation source: src/handlers/mon_35B_OutNumber.c

Description

Writes a number to the user's terminal. The number can be output as an octal or a decimal value.

  • The number may be in the range -32768 to 32767.

Parameters

Name Type Direction Description
Format INTEGER2 In Output format. 8=octal, 10=decimal, 16=hexadecimal, 2=bitpattern.
Number INTEGER2 In The number to be written (-32768 to 32767).

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

See also

OutMessage, OutUpTo8Bytes, Out8Bytes, OutString, OutputString, 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).

INTEGER : Format, Number
...
Monitor_Call('OutNumber', Format, Number)
    INTEGER Format, Number
    ...
    Monitor_Call('OutNumber', Format, Number)
    Format, Number : INTEGER2;
    ...
    OutNumber(Format, Number);
    01 Format COMP.
    01 Number COMP.
    ...
    MONITOR-CALL "OutNumber" USING Format, Number.
Format : W BLOCK 1 %12B=decimal, 10B=octal, 20B=hexadecimal, 2=bitpattern.
Number : W BLOCK 1
OutNumber : EQU 37B9 + 35B


CALLG OutNumber, 2, Format, Number
| Instruction | Operand | Comment                          |
|-------------|---------|----------------------------------|
| LDT         | FORM    | %Format of number to be printed. |
| LDA         | NUM     | %Number to be printed.           |
| MON         | 35      | %Monitor call OutNumber.         |
| ...         |         |                                  |
| FORM,       | 12      | %Interpret NUM as a decimal digit.|
| NUM,        | ...     |                                  |

ndmonlib implementation

In progress Registered MON_STATUS_IN_PROGRESS: partly implemented. The dispatcher calls the handler.

Handler mon_35B_OutNumber
Code lines 76 (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_35B_OutNumber.c
Last updated 2026-07-17

Format codes

  • Radix: decimal
  • Note: These are DECIMAL radix selectors, and the value IS the radix (8 = octal, 10 = decimal, 16 = hex) - with 2 meaning "16-bit bit pattern", not "binary number". Taken from this YAML's own Format parameter description.
  • Codes

    Code Name Description Status
    2 BitPattern Emits exactly 16 binary digits, MSB first, zero-padded, no sign. implemented
    8 Octal Octal digits, with a leading "-" for negative values. implemented
    10 Decimal Signed decimal. Also the fall-through for any unrecognised Format. implemented
    16 Hexadecimal Uppercase hex digits, with a leading "-" for negative values. implemented

Parameter notes

1. Number

Field Value
Note Read as a 32-bit word then TRUNCATED to int16_t - deliberate, because the manual bounds the value to -32768..32767. A caller passing a wider value silently loses the high half.
Verified Yes

Verified

Claim Evidence
Octal and hex are printed SIGN-MAGNITUDE ("-" then the magnitude), not as a two's-complement bit pattern. Only Format 2 shows the raw 16-bit pattern. mon_35B_OutNumber.c to_octal_string()/to_hex_string(): if (value < 0)
No newline is emitted - the number is written bare. mon_35B_OutNumber.c write_string_to_console(output) with no terminator appended.

Unverified

  • NO OBSERVED CALLER. No traced program issues 35B. Implemented but NOT proven end to end, and NONE of the formatting details below is confirmed against real SINTRAN output.
  • THE EXACT OUTPUT FORMATTING IS INFERRED, NOT READ. Field width, zero/space padding, any trailing separator, whether octal carries a "B" suffix, and whether hex is upper or lower case are NOT specified in the scanned manual pages. nd500x prints a bare unpadded C-style conversion. Real SINTRAN IOUT may differ in every one of these.
  • Sign-magnitude vs two's-complement for octal/hex of a negative number is a CHOICE made by the handler, not a documented behaviour.
  • Behaviour for an unrecognised Format is a CHOICE: nd500x falls through to decimal. Real SINTRAN may reject it.
  • This YAML's manual body says "The number can be output as an octal or a decimal value" while its own Format parameter lists four codes including 16 and 2. The wider list is used. Which is authoritative is not resolved here.

Sources

Doc Note
SINTRAN III Monitor Calls (ND-860228.2 EN) The manual body of this YAML; the Format parameter description is the source of the four codes.

Source

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