Rr/rrc, Rr/rrc -28, Maxq family user’s guide – Maxim Integrated MAXQ Family User Manual
Page 205

18-28
MAXQ Family User’s Guide
(MAXQ10 Version)
Rotate Right Accumulator
RR/RRC
Carry Flag (Ex/In)clusive
Description:
Rotates the active accumulator right by a single bit position. The RR instruction circulates the lsb of the accumula-
tor (bit 0) back to the msb (bit 7) while the RRC instruction includes the Carry (C) flag in the circular right shift.
Status Flags:
C (for RRC only), S, Z (for RRC only)
RR Operation:
7
Active Acc (Acc) 0
Acc.[6:0]
← Acc.[7:1]; Acc.7 ← Acc.0
Encoding:
15
0
Example(s):
; Acc = 45h, S=1, Z=0
RR
; Acc = A2h, S=1, Z=0
RR
; Acc = 51h, S=0, Z=0
RRC Operation:
7
Active Acc (Acc) 0 Carry Flag
Acc.7
← C; C ← Acc.0
Encoding:
15
0
Example(s):
; Acc = 45h, C=1, S=1, Z=0
RRC
; Acc = A2h, C=1, S=1, Z=0
RRC
; Acc = D1h, C=0, S=1, Z=0
1000
1010
1100
1010
1000
1010
1101
1010
Maxim Integrated