32.15.1.5 Explanation of the ROL and ROLP Instructions
When the ROL or ROLP instruction is executed, the S1 bits are
rotated to the left S2 number of bits. Every time 1 bit is rotated,
the topmost bit (the most significant bit) is rotated to the
bottom-most bit (least significant bit). The result is stored in
D1. The ROL and ROLP instructions always pass power. When using the
ROL and ROLP instructions, if the variables specified in operands
S1 and D1 are not the same type, an error will occur. Designate the
same variable type in operands S1 and D1.
Refer to the following for specifying a constant.
Specify the address to rotate bits.
Specifies the number of bits to rotate.
Specifies the address to store the rotation
result.
For example, when 1 bit is rotated to
left
When operand D1 is an integer variable
When operand D1 is an integer variable and
you want to input hexadecimal values in operands S1 and S2
When 0x (zero and lower case "x") is input, the following values
become hexadecimal values.
Use the same format when rotating data in a specified array
(integer variable array) and when specifying an array element.
An error will occur if the formats are different.
If the S1 and D1 arrays are the same size, S1 is treated like a
single giant integer. Bits are rotated from one element to the next
element.
Bits are rotated from one element to the next. The entire array
is rotated, not just bits in each element. Specify S2 as 0 or
higher, up to (32 x Array Size -1).
If both S1 and D1 are not arrays, 32 bits are rotated. For S2,
specify a value between 0 and 31.
|