ST10 FAMILY PROGRAMMING MANUAL
165/172
CoSHL
Accumulator Logical Shift Left
Group
Shift Instructions
Syntax
CoSHL op1
Operation
(count) <--
(op1)
(C) <--
0
DO WHILE
(count)
≠
0
(C) <--
(ACC
39
)
(ACC
n
) <--
(ACC
n-1
) [n=1...39]
(ACC
0
) <--
0
(count)
<-- (count) -1
END WHILE
Data types
ACCUMULATOR
Result
40-bit signed value
Description
Shifts the ACC register left by the number of times specified by the operand op1. The least significant bits
of the result are filled with zeros. Only shift values from 0 to 8 (inclusive) are allowed. “op1” can be either
a 5-bit unsigned immediate data, or the least significant 5 bits (considered as unsigned data) of any reg-
ister directly or indirectly addressed operand. When the MS bit of the MCW register is set and when a
32-bit overflow or underflow occurs, the obtained result becomes 00 7FFF FFFF
h
or FF 8000 0000
h
,
respectively. This instruction is repeatable when “op1” is not an immediate operand.
MAC Flags
Addressing Modes
Examples
N
Z
C
SV
E
SL
*
*
*
*
*
*
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Carry flag is set according to the last most significant bit shifted out of ACC.
SV
Set if the last shifted out bit is different from N.
E
Set if the MAE is used. Cleared otherwise.
SL
Set if the content of the ACC is automatically saturated. Not affected otherwise.
Mnemonic
Rep
Format
Bytes
CoSHL
Rw
n
Yes
A3 nn 8A rrrr:r000
4
CoSHL
#data
5
No
A3 00 82 ssss:s000
4
CoSHL
[Rw
m
⊗
]
Yes
83 mm 8A rrrr:rqqq
4
CoSHL
#3
; (ACC) <-- (ACC) << 3
CoSHL
R3
; (ACC) <-- (ACC) << (R3)
4-0
CoSHL
[R10 - QR0]
; (ACC) <-- (ACC) << ((R10))
4-0
; (R10) <-- (R10) - (QR0)
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...