Skip to content

337B ChangeSegment

Stub   MON 337B (223 decimal) · Mnemonic SPCHG · Group: RT Program Execution (manual section 2.10)

Available from: RT programs (manual compatibility box)

Emulation source: src/handlers/mon_337B_ChangeSegment.c

Description

Changes the segment and the page table your program uses. The monitor call is similar to JumpToSegment and ExitFromSegment. In addition, you may change the two page tables in use. The segment numbers are restricted to 8-bits (values 0-255). SegmentFunction (MON 341) is the equivalent monitor call for version K of SINTRAN III.

Notes

  • You cannot change reentrant segments.

Parameters

None.

See also

JumpToSegment, ExitFromSegment, and SegmentFunction

Compatibility

Machines Users Programs
ND-100 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 No No Yes No

Examples

From the manual (OCR text, not corrected).

%Code on initial segment. JumpToSegment is performed.

| Instruction   | Description                                       |
|---------------|---------------------------------------------------|
| SAA 3         | %Page table 1 and 2 in A register.                |
| COPY SA DD    | %Copy to D register.                              |
| LDT (PAR      | %Address of parameter list in T register.         |
| MON 337       | %ChangeSegment with bit 15 in D register = 0.     |
| CONT, ...     | %Execution continues here after ExitFromSegment.  |
| PAR, SUBRO    | %Start address on the new segment.                |
| 100201        | %Segment 200B and 201B.                           |

%Code on new segment. ExitFromSegment is performed.

| Instruction     | Description                                   |
|-----------------|-----------------------------------------------|
| SUBRO, STT SAVET| %Save T, L, and D registers.                  |
| COPY SL DT      |                                               |
| STT SAVEL       |                                               |
| COPY SD DT      |                                               |
| STT SAVED       |                                               |
| ...             |                                               |
| LDT SAVED       | %Restore D register                           |
| COPY ST DD      |                                               |
| BSET ONE DD 170 | %Set bit 15 for ExitFromSegment function.     |
| LDT SAVEL       | %Restore L and T registers.                   |
| COPY ST DL      |                                               |
| LDT SAVET       |                                               |
| MON 337         | %ChangeSegment to return to original segment. |

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_337B_ChangeSegment
Code lines 5 (non-blank, non-comment lines in the file)

Source

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