Texas Instruments TMS320C2XX 用户手册

下载
页码 587
SUB
Subtract From Accumulator
7-176
 
Cycles for a Single SUB Instruction (Using Direct and Indirect Addressing)
Program
Operand
ROM
DARAM
SARAM
External
DARAM
1
1
1
1+p
SARAM
1
1
1, 2
1+p
External
1+d
1+d
1+d
2+d+p
† If the operand and the code are in the same SARAM block.
Cycles for a Repeat (RPT) Execution of an SUB Instruction (Using Direct
and Indirect Addressing)
Program
Operand
ROM
DARAM
SARAM
External
DARAM
n
n
n
n+p
SARAM
n
n
n, n+1
n+p
External
n+nd
n+nd
n+nd
n+1+p+nd
† If the operand and the code are in the same SARAM block.
Cycles for a Single SUB Instruction (Using Short Immediate Addressing)
ROM
DARAM
SARAM
External
1
1
1
1+p
Cycles for a Single SUB Instruction (Using Long Immediate Addressing)
ROM
DARAM
SARAM
External
2
2
2
2+2p
Example 1
SUB
DAT80
;(DP = 8: addresses 0400h–047Fh,
;SXM=0: sign-extension suppressed)
Before Instruction
After Instruction
Data Memory
Data Memory
450h
11h
450h
11h
ACC
X
24h
ACC
1
13h
C
C
Example 2
SUB
*–,1,AR0
;(Left shift by 1, SXM = 0)
Cycles