SRL r

Operation

     n---------m  n--m
0 -->|7------>0|->|CY|
     v---------u  v--u
          r

Mnemonic

SRL

Operands

r

b7b6b5b4b3b2b1b0
1 1 0 0 1 0 1 1$CB
0 0 1 1 1 r

Description

The contents of register r are shifted right 1 bit posistion. The contents of bit 0 are copied to the Carry flag, and bit 7 is reset. Bit 0 is the least-significant bit. In the assembled object code, operand r is specified as follows:

RegisterrHex
A111$3F
B000$38
C001$39
D010$3A
E011$3B
H100$3C
L101$3D

Condition Bits Affected

Sis set reset.
Zis set if result is 0, otherwise it is reset.
His reset.
P/Vis set if parity even, otherwise it is reset
Nis reset.
Cis data from bit 0.

Example

Register D contains the following data:

76543210
10001111

Upon the execution of

	SRL	D

register D and the Carry Flag now contain:

76543210C
010001111