beautypg.com

Texas Instruments TMS320C2XX User Manual

Page 330

background image

Subtract From Accumulator

SUB

7-177

Assembly Language Instructions

Before Instruction

After Instruction

ARP

7

ARP

0

AR7

301h

AR7

300h

Data Memory

Data Memory

301h

04h

301h

04h

ACC

X

09h

ACC

1

01h

C

C

Example 3

SUB

#8h

;(SXM = 1: sign-extension mode)

Before Instruction

After Instruction

ACC

X

07h

ACC

0

FFFFFFFFh

C

C

Example 4

SUB

#0FFFh,4

;(Left shift by four, SXM = 0)

Before Instruction

After Instruction

ACC

X

0FFFFh

ACC

1

0Fh

C

C