dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 466

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
DECTSTA
Operation:
D – 1 → D
D – 0
Description: Decrement a value in an AGU pointer register and then compare the result to zero, updating the con-
Usage:
Example:
Explanation of Example:
Condition Codes Affected:
Instruction Fields:
Instruction Opcodes:
Timing:
Memory:
A-122
DECTSTA Rn
Operation
DECTSTA
Before Execution
R0
dition codes based on the comparison. The full 24-bit value of the pointer register is used when decre-
menting.
This instruction can be used to step backwards through a memory buffer, testing to see that the pointer
is still valid after each step.
DECTSTA R0
Prior to execution, the R0 register contains $002222. Execution of the DECTSTA R0 instruction caus-
es the value in R0 to be reduced by one, and the result ($002221) is stored back in R0. The updated
value in R0 is then compared with zero, and the CCR is updated accordingly.
N
Z
V
C
1 oscillator clock cycle
1 program word
LF
15
— Set if bit 23 of the result is set
— Set if all bits in the result are zero
— Set if overflow has occurred in result
— Set if a borrow occurs from bit 23 of the result
SR
(no parallel move)
P4
14
Operands
002222
Rn
13
P3
Decrement and Test AGU Register
0308
P2
12
MR
DSP56800E Core Reference Manual
P1
11
15
P0
1
10
C
1
0
; decrement R0 and then compare to 0
I1
W
9
1
0
Assembler Syntax:
DECTSTA
Decrement and test AGU register
I0
8
12
0
SZ
7
11
0
After Execution
6
L
R0
1
5
E
0
D
SR
U
4
CCR
0
8
002221
Comments
N
3
7
1
(no parallel move)
0
0300
2
Z
DECTSTA
Freescale Semiconductor
1
V
1
0
4
C
0
R
3
1
R
R
0

Related parts for dsp56800e