ROL (rotate left)

Left shifts the bits of a value with rotation.

Syntax

ROL1 value [in,1], n [in,1u], result [out,1] ;code:121
ROL2 value [in,2], n [in,1u], result [out,2] ;code:122
ROL4 value [in,4], n [in,1u], result [out,4] ;code:123
ROL8 value [in,8], n [in,1u], result [out,8] ;code:124

Description

This instruction performs bitwise left shift operation with rotation by n bits.

This instruction shifts the bits of input value left by the number of bits specified in n. Digits shifted off the left are moved as new bits on the right.

If n is greater than number of bits in the value (correspondingly 8, 16, 32 or 64) the result is undefined.

NoASM

There are several kinds of these instructions defined in NoASM Compiler:

ROL1,  ROL2,  ROL4,  ROL8,
ROL1u, ROL2u, ROL4u, ROL8u