dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 72

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Types and Addressing Modes
Two of the functions in the preceding list are built into the assembler. These functions, described in
Table 3-7, are useful for converting a word address or label into a byte address for instructions that expect
to receive a byte address.
Figure 3-14 shows a byte access using a byte pointer. The example executes the
instruction. The address contained in R0, $2001, is logically right shifted to give the correct word address,
$1000. The LSB of the R0 register selects which byte at the word address is accessed. In this example, the
LSB determines that the upper byte is to be accessed at location $1000. The lowest 8 bits of the A1
register, $CD, are then written to this location. The lower byte of memory location $1000 is not modified.
3-22
Assembler Function
An absolute address (upper byte):
An absolute address (lower byte):
An absolute address (upper byte):
@hb(value)
@lb(value)
The stack pointer register is always used as a word pointer.
Figure 3-14. Accessing a Byte with a Byte Pointer
Table 3-7. Useful Built-In Assembler Functions
Address
Word
(value<<1) + 1
(value<<1) + 0
Computation
Performed
DSP56800E Core Reference Manual
$001000
Instruction:
Access Size: Byte
Byte Selected: Upper
R0
MOVE.BP X:@hb($F000),X0
MOVE.BP X:@lb(VAR_LABEL),X0
MOVE.BP X:$108001,X0
15
C
X Memory
$002001
MOVE.BP A1,X:(R0)
Function is used to generate a byte address from a word
address or label for the upper byte of a word
Function is used to generate a byte address from a word
address or label for the lower byte of a word
D
NOTE:
X
X
0
LSB
Byte address: $2001
Word Address: $1000
Byte Select: 1 (Upper)
>>1
Comments
MOVE.BP A1,X:(R0)
Freescale Semiconductor

Related parts for dsp56800e