ST10 FAMILY PROGRAMMING MANUAL
166/172
CoSHR
Accumulator Logical Shift Right
Group
Shift Instructions
Syntax
CoSHR
op1
Operation
(count) <--
(op1)
(C) <--
0
DO WHILE
(count)
≠
0
((ACC
n
) <--
(ACC
n+1
) [n=0-38]
(ACC
39
) <--
0
(count)
<-- (count) -1
END WHILE
Data Types
ACCUMULATOR
Result
40-bit signed value
Description
Shifts the ACC register right by as many times as specified by the operand op1. The most significant bits
of the result are filled with zeros accordingly. Only shift values contained between 0 and 8 are allowed.
“op1” can be either a 5-bit unsigned immediate data, or the least significant 5 bits (considered as
unsigned data) of any register directly or indirectly addressed operand. The MS bit of the MCW register
does not affect the result. This instruction is repeatable when “op 1” is not an immediate operand.
MAC Flags
Addressing Modes
Examples
N
Z
C
SV
E
SL
*
*
0
-
*
-
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Cleared always.
SV
Not affected.
E
Set if the MAE is used. Cleared otherwise.
SL
Not affected.
Mnemonic
Rep
Format
Bytes
CoSHR
Rw
n
Yes
A3 nn 9A rrrr:r000
4
CoSHR
#data
5
No
A3 00 92 ssss:s000
4
CoSHR
[Rw
m
⊗
]
Yes
83 mm 9A rrrr:rqqq
4
CoSHR
#3
; (ACC) <-- (ACC) >> 3
CoSHR
R3
; (ACC) <-- (ACC) >> (R3)
4-0
CoSHR
[R10 - QR0]
; (ACC) <-- (ACC) >> ((R10))
4-0
; (R10) <-- (R10) - (QR0)
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...