4/17/98 6-131 Addressing Modes and Data Types
NORM Normalize
Syntax: NORM Rd, Rs
Operation:
Description: Logically shifts left the contents of the destination until the MSB is set, storing the
number of shifts performed in the count (source) register. The data size may be 8, 16, or 32 bits.
If the destination value already has the MSB set, the count returned will be 0. If the destination
value is 0, the count returned will be 0, the N flag will be cleared, and the Z flag will be set. For all
other conditions, the N flag will be 1 and the Z flag will be 0.
Note: a double word register is double-word aligned in the register file (R1:R0, R3:R2, R5:R4, or
R7:R6).
The last pair, i.e, R7:R6 is probably not a good idea as R7 is the current stack pointer.
Size: Byte, Word, Double Word
Flags Updated: N, Z
Bytes: 2
Clocks: For 8 or 16 bit shifts -> 4 + 1 for each 2 bits of shift
For 32 bit shifts -> 6 + 1 for each 2 bits of shift
Encoding:
Note: SZ1/SZ0 = 00: byte operation; SZ1/SZ0 = 01: reserved; SZ1/SZ0 = 10: word operation;
SZ1/SZ0 = 11: double word operation.
MSB 0LSB
(Rd)
d d d d s s s s1 1 0 0 SZ1 SZ0 1 1