Spac – Texas Instruments TMS320C2XX User Manual

Page 313

Advertising
background image

SPAC

Subtract PREG From Accumulator

7-160

Syntax

SPAC

Operands

None

Opcode

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

1

0

1

0

0

0

0

0

0

1

1

1

1

1

0

1

Execution

Increment PC, then ...
(ACC) – shifted (PREG)

ACC

Status Bits

Affected by

Affects

PM and OVM

C and OV

This instruction is not affected by SXM.

Description

The content of PREG, shifted as defined by the PM status bits, is subtracted
from the content of the accumulator. The result is stored in the accumulator.
SPAC is not affected by SXM, and the PREG value is always sign extended.

The function of the SPAC instruction is a subtask of the LTS, MPYS, and SQRS
instructions.

Words

1

Cycles for a Single SPAC Instruction

ROM

DARAM

SARAM

External

1

1

1

1+p

Cycles for a Repeat (RPT) Execution of an SPAC Instruction

ROM

DARAM

SARAM

External

n

n

n

n+p

Example

SPAC

;(PM = 0)

Before Instruction

After Instruction

PREG

10000000h

PREG

10000000h

ACC

X

70000000h

ACC

1

60000000h

C

C

Cycles

Advertising