| Hex | Mnemonic | Cycles |
|---|---|---|
| CE 8C | SRL A | 3 |
| CE 8D | SRL B | 3 |
| CE 8E ll | SRL [BR:ll] | 5 |
| CE 8F | SRL [HL] | 4 |
A = Register A
B = Register B
[BR:ll] = Memory: (EP shl 16) or (BR shl 8) or #nn
[HL] = Memory: (EP shl 16) or HL
; SRL Ds
;
; Ds = Source/Destination
Ds = Ds SRL 1
“8-bits Destination” bits are shifted right by 1.
NOTE: This instruction can be used as an unsigned integer division by 2.
Overflow remains unchanged
; A = 0x04 (4)
SRL A
; A = 0x02 (2)
; SC = (Zero=0):(Carry=0):(Negative=0)
; B = 0x45 (69)
SRL B
; B = 0x22 (34)
; SC = (Zero=0):(Carry=1):(Negative=0)
; B = 0x84 (132)
SRL B
; B = 0x42 (66)
; SC = (Zero=0):(Carry=0):(Negative=0)
; [HL] = 0x01 (1)
SRL [HL]
; [HL] = 0x00 (0)
; SC = (Zero=1):(Carry=1):(Negative=0)