SPAC
Subtract PREG From Accumulator
7-160
Syntax SPAC
Operands None
Opcode
0123456789101112131415
1010000001111101
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
CC
Cycles