NonStop S-Series Server Description Manual (G06.24+)
TNS Execution Modes
HP NonStop S-Series Server Description Manual—520331-003
6-7
The Environment Register
The carry bit, or K bit, (ENV.<9>), when equal to 1, generally indicates that a carry out
of the high-order bit position occurred when an add or subtract instruction was
executed on a 16-, 32-, or 64-bit operand. It reflects the result of the last such
instruction executed. Other uses of the K bit exist, such as to specify the result of
executing a scan instruction (SBW or SBU).
The overflow bit, or V bit, (ENV.<10>), if equal to 1, indicates that an overflow
condition occurred or a divide by zero was attempted. Overflow is generally
associated with arithmetic operations on 16-, 32-, and 64-bit operands. Overflow also
occurs in an LDIV instruction if the quotient cannot be represented in 16 bits, or in
floating-point arithmetic if the exponent is too large or too small. The V bit is not
“sticky;” it reflects only the most recent instruction that can set or clear it.
The condition code bits, a two-bit field, (ENV.<11:12>) forms the condition code. N
means negative or numeric; Z means zero or alphabetic. The condition code typically
reflects the outcome of a computation, comparison, bus transfer, or input-output
operation. Some other common uses are to reflect the outcome of calls to system
procedures and, by “load” instructions, to identify the characteristics of the word,
doubleword, or byte loaded onto the register stack. Various other uses are specified in
the instruction set definition. The condition code has three states:
CCL = less than, ENV.<11:12> = 10 (N = 1, Z = 0)
CCE = equal to, ENV.<11:12> = 01 (N = 0, Z = 1)
CCG = greater
than,
ENV.<11:12> = 00 (N = 0, Z = 0)
Figure 6-3. The Environment Register Maintains Procedure State
456789101112131415
ENV.<4> LS (Library Space): 0 = Code, 1 = Library
ENV.<5> PRIV: 0 = Nonprivileged, 1 = Privileged
ENV.<6> DS (Data Space): 0 = User, 1 = System Interrupt
ENV.<7> CS (Code Space): 0 = User, 1 = System
ENV.<8> T (Trap Enable): 0 = Disable, 1 = Enable
ENV.<9> K (Carry Bit): 0 = No Carry, 1 = Carry
ENV.<10> V (Overflow): 0 = No Overflow, 1 = Overflow
ENV.<11:12> CC (Condition Code): 10 = CCL (Less Than)
01 = CCE (Equal)
00 = CCG (Greater Than)
LS Priv DS CS T K V N Z
RP
(Register
Pointer)
(See following
two topics)
CC
VST268.vsd