PIC17C75X
Compare f with WREG,
skip if f = WREG
Compare f with WREG,
skip if f > WREG
CPFSEQ
CPFSGT
Syntax:
[ label ] CPFSEQ
f
Syntax:
[ label ] CPFSGT
f
Operands:
Operation:
0 ≤ f ≤ 255
Operands:
Operation:
0 ≤ f ≤ 255
(f) – (WREG),
skip if (f) = (WREG)
(unsigned comparison)
(f) − (WREG),
skip if (f) > (WREG)
(unsigned comparison)
Status Affected:
Encoding:
None
Status Affected:
Encoding:
None
0011
0010
ffff
ffff
0011
0001
ffff
ffff
Compares the contents of data memory
location 'f' to the contents of the WREG
by performing an unsigned subtraction.
Description:
Compares the contents of data memory
location 'f' to the contents of WREG by
performing an unsigned subtraction.
Description:
If the contents of 'f' are greater than the
contents of WREG then the fetched
instruction is discarded and an NOP is
executed instead making this a
two-cycle instruction.
If 'f' = WREG then the fetched instruc-
tion is discarded and an NOP is exe-
cuted instead making this a two-cycle
instruction.
Words:
Cycles:
1
Words:
Cycles:
1
1 (2)
1 (2)
Q Cycle Activity:
Q1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q2
Q3
Q4
Decode
Read
register 'f'
Process
Data
No
operation
Decode
Read
register 'f'
Process
Data
No
operation
If skip:
Q1
If skip:
Q1
Q2
Q3
Q4
Q2
Q3
Q4
No
No
No
No
No
No
No
No
operation
operation
operation
operation
operation
operation
operation
operation
HERE
NEQUAL
EQUAL
CPFSEQ REG
:
:
Example:
HERE
NGREATER
GREATER
CPFSGT REG
:
:
Example:
Before Instruction
Before Instruction
PC Address
=
=
=
HERE
PC
WREG
=
=
Address (HERE)
WREG
REG
?
?
?
After Instruction
After Instruction
If REG
>
=
≤
WREG;
Address (GREATER)
WREG;
If REG
=
=
≠
=
WREG;
Address (EQUAL)
WREG;
PC
If REG
PC
PC
If REG
PC
=
Address (NGREATER)
Address (NEQUAL)
1997 Microchip Technology Inc.
DS30264A-page 195