NORM ACC,XARn++/−−
SYNTAX OPTIONS
NORM ACC,XARn++
NORM ACC,XARn− −
Operands
ACC
XARn
++/−−
Description
Flags and
Z
Modes
N
TC
Repeat
Normalize ACC and Modify Selected Auxiliary Register
1111 1111 0111 1nnn
1111 1111 0111 0nnn
Accumulator register
XAR0 to XAR7, auxiliary registers post incremented or decremented
Normalize the signed content of the ACC register and modify the specified
auxiliary register (XAR0 to XAR7):
if(ACC != 0x0000 0000)
{
if((ACC(31) XOR ACC(30)) = 0)
{
ACC = ACC << 1, TC = 0;
if(XARn++ addressing mode) XARn += 1;
if(XARn−− addressing mode) XARn −= 1;
}
else
TC = 1;
}
else
TC = 1;
Note:
The NORM instruction normalizes a signed number in the ACC register by finding the
magnitude of the number. An XOR operation is performed on ACC bits 31 and 30. If the
bits are the same, then the content of the ACC register is logically shifted left by 1 to
eliminate the extra sign bit and the selected pointer is modified. If the bits are different,
the ACC is not shifted and the selected pointer is not modified. The selected pointer
does not access any memory location.
After the operation, the Z flag is set if the ACC value is zero, else Z is cleared.
After the operation, the N flag is set if bit 31 of the ACC is 1, else N is cleared.
If the operation set TC, no normalization was needed (ACC did not need to
be modified). If the operation cleared TC, bits 31 and 30 were the same and,
as a result, the ACC register was logically shifted left by 1.
This instruction is repeatable. If the operation follows a RPT instruction, then
the NORM instruction will be executed N+1 times. The state of the Z, N, and
TC flags will reflect the final result. Note: If you only want the NORM
instruction to execute until normalization is done, you can create a loop that
checks the value of the TC bit. When TC = 1, normalization is complete.
OPCODE
OBJMODE
NORM ACC,XARn++/− −
.
RPT
CYC
X
Y
N+4
X
Y
N+4
6-253
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?