dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 235

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
7.5.2.1
For absolute addresses, the following rules apply:
Two examples appear in Example 7-6.
; AND the value $1F with a byte in data memory
; ===> 8-bit mask in lower byte of 16-bit mask, for lower byte at word address
; OR the value $F8 with a byte in data memory
; ===> 8-bit mask in upper byte of 16-bit mask, for upper byte at word address
Similar techniques can be used for performing bit operations on bytes with other addressing modes, such
as (Rn+xxxx).
7.5.2.2
A technique that is similar to the one described in Section 7.5.2.1, “Absolute Addresses,” can be used for
manipulating a byte referenced through a word pointer with a byte offset. In this case, the technique that is
outlined in Section 7.5.3, “Using Complex Addressing Modes,” is used for synthesizing an address.
For addresses with byte offsets, the following rules apply:
Two examples appear in Example 7-7 on page 7-8.
Freescale Semiconductor
The address used in the bit-manipulation instruction is the byte address, logically right shifted 1 bit.
For even byte addresses, the 8-bit mask is placed in the lower 8 bits of the 16-bit mask, and the upper
8 bits of the mask are zeroed.
For odd byte addresses, the 8-bit mask is placed in the upper 8 bits of the 16-bit mask, and the lower
8 bits of the mask are zeroed.
The base address is stored in an Rn register as a word pointer.
The offset that is added to the pointer is the offset value in bytes, arithmetically right shifted 1 bit.
For even byte addresses, the 8-bit mask is placed in the lower 8 bits of the 16-bit mask, and the upper
8 bits of the mask are zeroed.
For odd byte addresses, the 8-bit mask is placed in the upper 8 bits of the 16-bit mask, and the lower
8 bits of the mask are zeroed.
ANDC
ORC
Absolute Addresses
Word Pointers with Byte Offsets
Example 7-6. Logical Operations on Bytes in Memory
#$FF1F,X:$1000
#$F800,X:$1000
Bit-Manipulation Unit
; Bit Operation
; (8-bit mask placed in lower byte)
; Bit Operation
; (8-bit mask placed in upper byte)
Programming Considerations
7-7

Related parts for dsp56800e