<< Previous | Next >>

> SRL bb,BCDE
> SRL bb,JKHL Shift Right Logical Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> ---- | SRL bb,BCDE | 4 (2,2) | BCDE = {0,BCDE[31,1]} CF = E[0] bb = bb - 1 repeat while bb != 0
> DD B8 | SRL 1,BCDE | 4 (2,2) | repeat the operation 1 time
> DD B9 | SRL 2,BCDE | 4 (2,2) | repeat the operation 2 times
> DD BB | SRL 4,BCDE | 4 (2,2) | repeat the operation 4 times
> ---- | SRL bb,JKHL | 4 (2,2) | JKHL = {0,JKHL[31,1]} CF = L[0] b b= bb - 1 repeat while bb != 0
> FD B8 | SRL 1,JKHL | 4 (2,2) | repeat the operation 1 time
> FD B9 | SRL 2,JKHL | 4 (2,2) | repeat the operation 2 times
> FD BB | SRL 4,JKHL | 4 (2,2) | repeat the operation 4 times

> Flags | ALTD | IOI/IOE
> S | Z | L/V | C | F | R | SP | S | D
> · | · | L | · | · | · |  |  |

> #### Description

> Shifts to the right the bits of the data in register BCDE or JKHL. Bits 1 through 31 are each shifted to the next lowest-order bit position (bit 31 moves to bit 30, etc.). The lowest-order bit (bit 0 of E or L) is shifted to the C flag.

> Figure 23: The bit logic of the SRL instruction.

> The instruction repeats the b number of times, which can be 1, 2 or 4.

<< Previous | Next >>