
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TMS320C2x DSP - syntax direct [<label>] sqrs <dma>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SYNTAX DIRECT [<LABEL>] SQRS <dma>
INDIRECT [<LABEL>] SQRS {ind}[,<next ARP>]
OPERANDS 0 . dma . 127; 0 . next ARP . 7.
EXECUTION (PC) + 1 . PC
(ACC) - (shifted P register) . ACC
(dma) . T register
(dma) * (dma) . P register
Affects OV; affected by PM and OVM.
Affects C (TMS320C25).
DESCRIPTION The contents of the P register, shifted as defined by the PM
status bits, are subtracted from the accumulator. The
addressed data memory value is then loaded into the T
register, squared, and stored in the P register.
WORDS 1
ENCODING 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-----------------------------------------------+
|0 1 0 1 1 0 1 0| 0| data memory address | DIRECT
+-----------------------------------------------+
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-----------------------------------------------+
|0 1 0 1 1 0 1 0| 1| see indirect fields | INDIRECT
+-----------------------------------------------+
CYCLES
+------------------------------------------------+
| Cycle Timings for a Single Instruction |
|------------------------------------------------|
| PI/DI | PI/DE | PE/DI | PE/DE | PR/DI | PR/DE |
|-------+-------+-------+--------+-------+-------|
'20 | 1 | 2+d | 1+p | 2+d+p | - | - |
|-------+-------+-------+--------+-------+-------|
'C25 | 1 | 2+d | 1+p | 2+d+p | 1 | 2+d |
|------------------------------------------------|
| Cycle Timings for a Repeat Instruction |
|------------------------------------------------|
'20 | n | 2n+nd | n+p | 2n+nd+p| - | - |
|-------+-------+-------+--------+-------+-------|
'C25 | n | 1+n+nd| n+p |1+n+nd+p| n |1+n+nd |
+------------------------------------------------+
EXAMPLE SQRS DAT9 (DP = 6, PM = 0)
or
SQRS * If current auxiliary register contains 777.
BEFORE AFTER
dm777 >8 dm777 >8
T >1124 T >8
P >190 P >40
ACC X >1450 ACC 0 >12C0
C C
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson