Square Value and Subtract Previous Product

SQRS
7-171

Assembly Language Instructions

Cycles for a Repeat (RPT) Execution of an SQRS Instruction
Program
Operand ROM DARAM SARAM External
DARAM n n n n+p
SARAM n n n, n+1n+p
External n+nd n+nd n+nd n+1+p+nd
If the operand and the code are in the same SARAM block

Example 1 SQRS DAT9 ;(DP = 6: addresses 0300h–037Fh,

;PM = 0: no shift of product)
Before Instruction After Instruction
Data Memory Data Memory
309h 08h 309h 08h
TREG 1124h TREG 08h
PREG 190h PREG 40h
ACC X 1450h ACC 1 12C0h
CC

Example 2 SQRS *,AR5 ;(PM = 0)

Before Instruction After Instruction
ARP 3 ARP 5
AR3 309h AR3 309h
Data Memory Data Memory
309h 08h 309h 08h
TREG 1124h TREG 08h
PREG 190h PREG 40h
ACC X 1450h ACC 1 12C0h
CC