Z8 Microcontrollers
ZiLOG Instruction Descriptions and Formats
UM001601-0803 12-65
SRA
SHIFT RIGHT ARITHMETIC
Example:
If the contents of Working Register R6 are 31H (00110001B), the statement:
SRA R6
Op Code: D0 E6
leaves the value 98H (00011000) in Working Register R6. The C Flag is set, and the Z, V, and S Flags are cleared.
Example:
If Register C6 contains the value DFH, and Register DFH contains the value B8H (10111000B), the statement:
SRA @C6
Op Code: D1 C6
leaves the value DCH (11011100B) in Register DFH. The C, Z, and V Flags are reset, and the S Flag is set.