2. 40-bit overflow detection is enabled by the key word `40'. If overflow is detected,
the result in accumulator AC3 will be saturated to its 40-bit maximum value.
3. The option `T3 *AR1' loads the data pointed at by AR1 into the temporary
register T3 for later use.
4. Finally, AR1 and AR2 are incremented by one to point to the next data location in
macmr40 T3 *AR1, *AR2, AC3
00 0000 0020
00 235B 0000
2.6.2 Logic and Bits Manipulation Instructions
Logic operation instructions such as AND, OR, NOT, and XOR (exclusive-OR) on data
values are widely used in program decision-making and execution flow control. They
are also found in many applications such as error correction coding in data commu-
nications. For example, the instruction and #0xf, AC0 clears all upper bits in the
accumulator AC0 but the four least significant bits.
and #0xf, AC0
00 1234 5678
00 0000 0008
The bit manipulation instructions act on an individual bit or a pair of bits of a register
or data memory. These types of instructions consist of bit clear, bit set, and bit test to a
specified bit (or a pair of bits). Similar to logic operations, the bit manipulation
instructions are often used with logic operations in supporting decision-making pro-
cesses. In the following example, the bit clear instruction clears the carry bit (bit 11) of
the status register ST0.
INTRODUCTION TO TMS320C55X DIGITAL SIGNAL PROCESSOR