3. Instructions
320
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
z ROL
z ROLL
Hint
It is possible to set the Carry Flag contents to 1 or 0 immediately before executing this instruction, by
using the Set Carry (STC(040)) or Clear Carry (CLC(041)) instructions.
Example Programming
ROL(027) shifts all bits of Wd including the
Carry Flag (CY) to the left (from rightmost bit
to leftmost bit).
ROLL(572) shifts all bits of Wd and Wd +1
including the Carry Flag (CY) to the left (from
rightmost bit to leftmost bit).
When CIO 0.00 is ON, word CIO 100 and the
Carry Flag (CY) will shift one bit to the left.
The contents of CIO 100.15 will be shifted to
the Carry Flag (CY) and the Carry Flag
contents will be shifted to CIO 100.00.
When CIO 0.00 is ON, word CIO 100, CIO 101 and
the Carry Flag (CY) will shift one bit to the left. The
contents of CIO 100.15 will be shifted to the Carry
Flag (CY) and the Carry Flag contents will be shifted
to CIO 100.00.
Wd+1
Wd
CIO 100
0.00
Instruction executed once
Wd:
Wd
Instruction executed once
Wd+1: CIO 101 Wd: CIO 100
Wd
0.00