NonStop S-Series Server Description Manual (G06.27+)

TNS Instruction Set
HP NonStop S-Series Server Description Manual520331-004
11-21
Definitions of TNS Instructions
less than 0 give undefined results. Condition Code is set. Refer to Figure 11-4 on
page 11-5 for a comparison of logical (unsigned) shifts and arithmetic (signed) shifts.
DMPY (000222). Double Multiply DC by BA. The doubleword integer contained in DC
is multiplied in doubleword integer form by the doubleword integer in BA. Both
operands are then deleted, and the result is pushed onto the stack. Overflow is set if
the result is greater than 2
31
–1 or less than –2
31
.
Carry can be set, and Condition
Code is set on the result.
DNEG (000224). Double Negate BA. The doubleword integer contained in BA is
replaced with its two’s complement. Overflow is set if the original operand was –2
31
.
Carry can be set, and Condition Code is set on the result.
DPCL (000032). Dynamic Procedure Call. Control is transferred to a procedure that is
dynamically specifiable in the register stack (register A). The specified procedure can
be in any of the four code spaces (UC, SC, UL, and SL). The format of the word in
register A for specifying the target procedure is the same as that for a XEP table entry
(see Figure 6-36). DPCL first stores a three-word stack marker, consisting of the
current P, ENV, and L, on the top of the stack. (This copy of ENV includes the caller’s
space ID index in bits 11:15.) The address space mappings of relative segments 2 and
3 (current code segment and latest user code segment) are updated. Then, if the
caller is not privileged, the PEP number is checked to see if the call is legal. If the call
is not legal, an instruction failure trap occurs. If the caller is privileged, this check is not
made. L and S are set to S + 3 to point to the base of a new local data area. The final
value of S is then checked for a value greater than 32767; if it is, a stack overflow trap
occurs. Next, if the call is to a callable system procedure, the PRIV bit in the ENV
register is set. CS and LS of ENV are set according to the corresponding bits of A
(0 and 1, respectively). Finally, P is set from the PEP entry, transferring control to the
target procedure.
DPF (000014). Deposit Field in A. This instruction combines the words contained in
registers A and C of the stack as a function of a mask word contained in register B of
the stack. A logical OR operation is performed on the logical AND of B and C and the
logical AND of not B and A, so that all bits in C corresponding to ones in B are
deposited into corresponding bits in A. The original three words are deleted from the
stack and the result pushed onto the stack. Condition Code is set. An example of this
operation is shown in Figure 11-9 on page 11-22.
This example illustrates depositing a field using the DPF instruction. The principle also
applies to the DFG, DFS, and DFX instructions. In all three cases, the source word is
in C and the mask is in B. For DPF, the unmasked part of the source word is deposited
into the existing contents of A. For DFG and DFS, the unmasked part of the source
word is deposited into the memory cell addressed by A, located in the current user
data segment or in the system data segment, respectively. (Register assignments are
different for DFX, which uses B and A for an extended address.)