157B SegmentToPageTable¶
Stub MON 157B (111 decimal) · Mnemonic ENTSG · Group: RT Program Execution (manual section 2.10)
Available from: RT programs (manual compatibility box)
Emulation source: src/handlers/mon_157B_SegmentToPageTable.c
Description¶
Enters a routine as a direct task or as a device driver, and "remembers" which segments have been entered (up to 24 segments). These are reentered at restart following a power failure. The routines are connected to the interrupt system. They are loaded with the RT LOADER or by DMAC.
- The segment where the routine resides must be fixed in memory. See FixScattered.
- The segments can be removed from the selected PIT by using function 4 of ChangeActiveSegments (MON 341).
- Unfixing the segment (using UnFixSegment, MON 116), removes it from the Page Index Table.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
SegmentNo |
INTEGER2 | In | Segment number where the routine resides. |
PageTable |
INTEGER2 | In | Page table to use for the segment. In practice, this should be 3. For SINTRAN III VSX, version K, the range is 0-17. |
InterruptLevel |
INTEGER2 | In | The interrupt level where the direct task should run. You must specify one of the free levels 6, 7, 10B or 11B. Do not use level 2B on SINTRAN III VSX, version K. |
StartAddress |
INTEGER2 | In | Start address of the routine (entry point). |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
@ENTSEG
Compatibility¶
| Machines | Users | Programs |
|---|---|---|
| ND-100 and ND-500 | User RT and user SYSTEM | RT 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 : SegNo, PageTable, InterruptLevel, StartAddress
...
Monitor_Call('SegmentToPageTable', SegNo, PageTable, &
InterruptLevel, StartAddress)
INTEGER SegmentNo, PageTable
INTEGER InterLevel, StartAddress
...
Monitor_Call('SegmentToPageTable', SegmentNo, PageTable,
C InterLevel, StartAddress)
SegmentNo, PageTable, InterruptLevel, StartAddr : INTEGER2;
... [Note routine name.]
EnterSegment(SegmentNo, PageTable, InterruptLevel);
01 SegmentNo COMP.
01 PageTable COMP.
01 InterruptLevel COMP.
01 StartAddress COMP.
...
MONITOR-CALL "SegmentToPageTable" USING SegmentNo, PageTable,
InterruptLevel, StartAddress.
SegNo : W BLOCK 1
PageTable : W BLOCK 1
InterLevel : W BLOCK 1
StartAddr : W BLOCK 1
SegmentToPageTable : EQU 37B9 + 157B
...
CALLG SegmentToPageTable, 4, SegNo, PageTable, InterLevel, StartAddr
LDA (PAR %Load register A with address of parameter list.
MON 157 %Monitor call SegmentToPageTable.
...
PAR, SEG %The segment where the routine resides.
PAGE %Page table to be used.
INTR %Interrupt level where the direct task will run.
ENTRY %Entry point, start address of direct task.
...
SEG, ...
PAGE, ...
INTR, ...
ENTRY, ...
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_157B_SegmentToPageTable |
| Code lines | 9 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 431.