HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

SWITCHDB

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

CM callable only.

Switches the DB register pointer. Privileged mode (PM) capability is required.

Syntax

     U16      O-P    U16V

   logindex:=SWITCHDB(index)

Functional Return

logindex

16-bit unsigned integer (assigned functional return)

Returns the logical index of the data segment indicated by the previous DB register setting, allowing this setting to be restored later. If the previous DB setting indicated the stack, a zero is returned.

Parameters

index

16-bit unsigned integer by value (required)

Passes the logical index of the data segment where the DB register is to be switched (obtained through the GETDSEG intrinsic). The value specified is checked to ensure that the process has acquired access to the segment previously. For an extra data segment, a positive, nonzero integer must be specified. To switch to the stack segment, a zero must be specified.

Condition Codes

CCE (2)

Request granted.

CCG (0)

Not returned.

CCL (1)

Request denied. An illegal data segment was specified.

Related Information

Intrinsics

GETDSEG

Commands

None

Manuals

Introduction to MPE XL for MPE V Programmers (30367-90005)

Feedback to webmaster