8XC196MC, MD, MH USER’S MANUAL
3-4
3.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 3-3.
3.1.8 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.
3.1.9 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.
3.1.10 Floating Point Operations
The hardware does not directly support operations on REAL (floating point) variables. Those op-
erations are supported by floating point libraries from third-party tool vendors. (See the Develop-
ment Tools Handbook.) The performance of these operations is significantly improved by the
NORML instruction and by the sticky bit (ST) flag in the processor status word (PSW). The
NORML instruction normalizes a 32-bit variable; the sticky bit (ST) flag can be used in conjunc-
tion with the carry (C) flag to achieve finer resolution in rounding.