Intel 80C196NU User Manual

Page of 471
8XC196NP, 80C196NU USER’S MANUAL
4-4
4.1.7
LONG-INTEGER Operands
A LONG-INTEGER is a 32-bit, signed variable that can take on values from –2,147,483,648
(– 2
31
) through +2,147,483,647 (+2
31
–1). The architecture directly supports LONG-INTEGER
operands only as the operand in shift operations, as the dividend in 32-by-16 divide operations,
and as the product of 16-by-16 multiply operations. For these operations, a LONG-INTEGER
variable must reside in the lower register file and must be aligned at an address that is evenly di-
visible by four. The address of a LONG-INTEGER is that of its least-significant byte (the even
byte address).
LONG-INTEGER operations that are not directly supported can be easily implemented with two
INTEGER operations. See the example in “DOUBLE-WORD Operands” on page 4-3.
4.1.8
QUAD-WORD Operands
A QUAD-WORD is a 64-bit, unsigned variable that can take on values from 0 through 2
64
–1.
The architecture directly supports the QUAD-WORD operand only as the operand of the EB-
MOVI instruction. For this operation, the QUAD-WORD variable must reside in the lower reg-
ister file and must be aligned at an address that is evenly divisible by eight.
4.1.9
Converting Operands
The instruction set supports conversions between the operand types. The LDBZE (load byte, zero
extended) instruction converts a BYTE to a WORD. CLR (clear) converts a WORD to a
DOUBLE-WORD by clearing (writing zeros to) the upper WORD of the DOUBLE-WORD.
LDBSE (load byte, sign extended) converts a SHORT-INTEGER into an INTEGER. EXT (sign
extend) converts an INTEGER to a LONG-INTEGER.
4.1.10 Conditional Jumps
The instructions for addition, subtraction, and comparison do not distinguish between unsigned
(BYTE, WORD) and signed (SHORT-INTEGER, INTEGER) operands. However, the condition-
al jump instructions allow you to treat the results of these operations as signed or unsigned quan-
tities. For example, the CMP (compare) instruction is used to compare both signed and unsigned
16-bit quantities. Following a compare operation, you can use the JH (jump if higher) instruction
for unsigned operands or the JGT (jump if greater than) instruction for signed operands.