ROL
ROL, ROLP, DROL, DROLP
ROL instruction rotates the (D) data source towards the left by (n) bits without carry flag.
ROL(ROLP) is for 16bit source and DROL(DROLP) is for 32bit source.
| |
D | Source |
n | Number of bits to move left |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
ROL(P) DROL(P) | D | o | - | o | o | o | - | o | o | - | o | o | o | - | 3 | o | - | o |
n | o | o | o | o | o | o | o | o | - | o | o | o | o |
Example)
If F12 is ON, H4437 moves to M20.
If X00 is ON, the ROLP instruction moves 1bit to the left side within M20 (16bit).
The highest bit (b15) moves to the lowest bit (b0) as rotation.