dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 210

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Address Generation Unit
ARRAY1
CODESTART MOVEU.W
After the code in Example 6-5 has been executed, the values in the accumulator registers are:
Recall that constant offset values are always specified in bytes when byte accesses are performed.
Figure 6-6 on page 6-17 demonstrates the AGU arithmetic that is performed when the instruction
MOVE.B X:(R1+7),B
specified, the eighth element in the array is read.
6-16
A
B
C
D
ORG
DCB
DCB
DCB
DCB
ORG
MOVE.BP
MOVEU.BP X:(R1+7),B
MOVEU.W
MOVE.BP
MOVE.BP
X
X
X
X
Example 6-5. Accessing Elements in an Array of Bytes
is executed. Because R1 is a byte pointer and an offset of 7 bytes has been
Before Execution
X:$3000
$22,$11
$44,$33
$66,$55
$88,$77
P:
#@lb(ARRAY1),R1; set up byte pointer to base of array
X:(R1+4),A
#@lb(ARRAY1),R1; set up byte pointer to base of array
X:(R1)+,C
X:(R1)+,D
X
X
X
X
DSP56800E Core Reference Manual
; Array of Bytes named “ARRAY1”
; 1st is $11, 2nd is $22
; 3rd is $33, 4th is $44
; 5th is $55, 6th is $66
; 7th is $77, 8th is $88
; (instructions located in program memory)
; read with offset of 4 bytes from R1 (byte pointer)
; read with offset of 7 bytes from R1 (byte pointer)
; read first array element and advance pointer
; read second array element and advance pointer
X
X
X
X
C
D
A
B
$0
$0
$0
$0
After Execution
$0055
$0088
$0011
$0022
Freescale Semiconductor
$0000
$0000
$0000
$0000

Related parts for dsp56800e