Infineon Technologies C166S V2 User Manual page 295

16-bit microcontroller
Table of Contents

Advertisement

ROL
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
(count) ← (op2)
(C) ← 0
DO WHILE ((count) ≠ 0)
END WHILE
Description
Rotates the destination word operand op1 the number of times as specified by the
source operand op2. Bit 15 is rotated into Bit 0 and into the Carry. Only shift values
between 0 and 15 are allowed. When using a GPR as the count control, only the least
significant four bits are used.
CPU Flags
E
Always cleared.
Z
Set if result equals zero. Cleared otherwise.
V
Always cleared.
C
The carry flag is set according to the last most significant bit shifted out of
op1. Cleared for a shift count of zero.
N
Set if the most significant bit of the result is set. Cleared otherwise.
User Manual
Shift and Rotate Instructions
ROL op1, op2
op1 → WORD
op2 → shift counter
op1 → WORD
(C) ← (op1[15])
(op1[n]) ← (op1[n-1]) [n=15...1]
(op1[0]) ← (C)
(count) ← (count) - 1
E
Z
0
*
Detailed Instruction Description
Rotate Left
V
C
0
S
8-295
User Manual
C166S V2
ROL
N
*
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents