68
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Instruction Set
4.31
Rotate Right through Carry
RRC
Shifts all bits of the instruction’s argument one bit to the right. The Carry Flag is loaded into the most significant
bit of the argument. Bit 0 of the argument is loaded into the Carry Flag.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
RRC
A
0x6D
4
1
RRC
[expr]
0x6E
7
2
RRC
[X+expr]
0x6F
8
2
Conditional
Flags:
CF
ZF
Set if LSB of the specified operand was set before the shift; cleared oth-
erwise.
Set if the result is zero; cleared otherwise.
Example 1:
or
F, 0x04
;set carry flag
and
A, 0x00
;clear the accumulator
rrc
A
;A=0x80, CF=0, ZF=0
Example 2:
and
F, 0xFB
;clear carry flag
mov
A, 0xFF
;initialize A to 255
and
A, 0x00
;make sure all flags are cleared
rrc
A
;A=0x7F, CF=1, ZF=0
Example 3:
or
F, 0x04
;set carry flag
mov
[0xEB], 0xAA
;initialize A to 170
rrc
[0xEB]
;ram[0xEB]=0xD5, CF=1, ZF=0
7
4
5
2
3
0
1
6
CF
A
CF
A:0, A:0
A:1, A:1
A:2
A:2
A:3, A:3
A:4, A:4
A:5
A:5
A:6, A:6
A:7, A:7
CF
ram k
CF
ram k
:0
ram k
:0
ram k
:1
ram k
:1
ram k
:2
ram k
:2
ram k
:3
ram k
:3
ram k
:4
ram k
:4
ram k
:5
ram k
:5
ram k
:6
ram k
:6
ram k
:7
ram k
:7
CF
ram X k
+
CF
ram X k
+
:0
ram X k
+
:0
ram X k
+
:1
ram X k
+
:1
ram X k
+
:2
ram X k
+
:2
ram X k
+
:3
ram X k
+
:3
ram X k
+
:4
ram X k
+
:4
ram X k
+
:5
ram X k
+
:5
ram X k
+
:6
ram X k
+
:6
ram X k
+
:7
ram X k
+
:7
CF
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...