322B GetSegmentNo¶
Stub MON 322B (210 decimal) · Mnemonic GSGNO · Group: Segment Administration (manual section 2.12)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_322B_GetSegmentNo.c
Description¶
Gets the number of a segment in the ND-100. You specify the segment name. Segment names are created with the RT LOADER or when a program is dumped reentrant. See @DUMP-PROGRAM-REENTRANT.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
SegmentName |
STRING | In | Segment name (6 characters). |
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 : SegmentNumber
BYTES : SegmentName(0:5)
...
Monitor_Call('GetSegmentNo', SegmentName, SegmentNumber)
INTEGER SegmentNumber
CHARACTER SegmentName*6
...
Monitor_Call('GetSegmentNo', SegmentName(1:6), SegmentNumber)
SegmentNumber : INTEGER2;
SegmentName : PACKED ARRAY [0..5] OF CHAR;
...
GetSegmentNo(SegmentName, SegmentNumber);
01 SegmentNumber COMP.
01 SegmentName PIC X(6).
...
MONITOR-CALL "GetSegmentNo" USING SegmentName, SegmentNumber.
SegmentNumber : W BLOCK 1
SegmentName : STRINGDATA 'EXSEG' %Get number of segment EXSEG.
ErrCode : W BLOCK 1
GetSegmentNo : EQU 37B9 + 322B
...
CALLG GetSegmentNo, 1, SegmentName
IF K GO ERROR
W1 =: SegmentNumber
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDA (PAR %Load register A with address of parameter list.
MON 322 %Monitor call GetSegmentNo.
JAN ERROR %Handle error if register A is negative.
STA SEGNO %Store segment number.
...
ERROR, ... %No segment has EXSEG as name.
...
SEGNO, 0
PAR, SEGNAM %String containing segment name.
...
SEGNAM, 'EXSEG' %Obtain segment number of EXSEG.
ndmonlib implementation¶
Stub Registered MON_STATUS_NOT_IMPLEMENTED: the handler is a stub. mon_dispatch() in src/core/mon_dispatch.c reports the call as unimplemented without calling it.
| Handler | mon_322B_GetSegmentNo |
| Code lines | 6 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 279.