PIC17C75X
RRNCF
Syntax:
Rotate Right f (no carry)
SETF
Set f
[ label ] RRNCF f,d
Syntax:
Operands:
[ label ] SETF f,s
Operands:
0 ≤ f ≤ 255
0 ≤ f ≤ 255
d
[0,1]
s
[0,1]
Operation:
f<n> → d<n-1>;
f<0> → d<7>
Operation:
FFh → f;
FFh → d
Status Affected:
Encoding:
None
Status Affected:
Encoding:
None
0010
000d
ffff
ffff
0010
101s
ffff
ffff
The contents of register 'f' are rotated
one bit to the right. If 'd' is 0 the result is
placed in WREG. If 'd' is 1 the result is
placed back in register 'f'.
If 's' is 0, both the data memory location
'f' and WREG are set to FFh. If 's' is 1
only the data memory location 'f' is set
to FFh.
Description:
Description:
Words:
Cycles:
1
1
register f
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q Cycle Activity:
Q1
Decode
Read
register 'f'
Process
Data
Write
register 'f'
and other
specified
register
Q2
Q3
Q4
Decode
Read
register 'f'
Process
Data
Write to
destination
RRNCF
REG, 1
Example 1:
SETF
REG, 0
Example1:
Before Instruction
Before Instruction
WREG
REG
=
=
?
REG
WREG
=
=
0xDA
0x05
1101 0111
After Instruction
After Instruction
WREG
REG
=
=
0
REG
WREG
=
=
0xFF
0xFF
1110 1011
Example2:
SETF
REG, 1
RRNCF
REG, 0
Example 2:
Before Instruction
Before Instruction
REG
WREG
=
=
0xDA
0x05
WREG
REG
=
=
?
1101 0111
After Instruction
After Instruction
REG
WREG
=
=
0xFF
0x05
WREG
REG
=
=
1110 1011
1101 0111
DS30264A-page 210
1997 Microchip Technology Inc.