1. Shift to the right with carry loop RCR/RCRD
ในหน้านี้5 หัวข้อ
1.1. Instruction Description#
The instruction moves the value of a single character (IN1) to the right (IN2) bits and loads the result into the single character (OUT). At the beginning of the movement, place the carry flag on the right side, and after the movement is completed, write the move out bit into the carry flag.
| Related registers | Description |
|---|---|
| M8165 | Direction indication for bit movement command. (OFF: Move to the right, ON: Move to the left) |
| M8166 | The last bit to be removed. |
| M8167 | The result of the shift operation is 0. |
1.2. The valid operands of the instruction#
1.2.1. Single word Instruction(RCR)#
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| IN1 | 16 bit unsigned integer | D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) | Input |
| IN2 | 16 bit unsigned integer | D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) | shift |
| OUT | 16 bit integer | D/CV/TV/AO/V/Z, bit composite word (Y/M/C/T/S), local variable (LW) | output |
1.2.2. Double word instruction(RCRD)#
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| IN1 | 32-bit unsigned integer | D/CV/K/H/FD, bit composite word (X/Y/M/C/T/S), local variable (LD) | input |
| IN2 | 32-bit unsigned integer | D/CV/K/H/FD, bit composite word (X/Y/M/C/T/S), local variable (LD) | shift |
| OUT | 32-bit integer | D/CV, bit composite word (Y/M/C/T/S), local variable (LD) | output |
1.3. Example#
Command table
NETWORK 000
LD M000
RCR D0 K1 D1
NETWORK 001
LD M001
RCRD D2 K16 D4
图1 RCR

