English
Language : 

PIC17C4X Datasheet, PDF (119/240 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM/ROM Microcontroller
PIC17C4X
CPFSEQ
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
If skip:
Q1
Forced NOP
Compare f with WREG,
skip if f = WREG
[ label ] CPFSEQ f
0 ≤ f ≤ 255
(f) – (WREG),
skip if (f) = (WREG)
(unsigned comparison)
None
0011 0001 ffff ffff
Compares the contents of data memory
location 'f' to the contents of WREG by
performing an unsigned subtraction.
If 'f' = WREG then the fetched instruc-
tion is discarded and an NOP is exe-
cuted instead making this a two-cycle
instruction.
1
1 (2)
Q2
Read
register 'f'
Q3
Execute
Q2
NOP
Q3
Execute
Q4
NOP
Q4
NOP
Example:
HERE CPFSEQ REG
NEQUAL :
EQUAL :
Before Instruction
PC Address =
WREG
=
REG
=
HERE
?
?
After Instruction
If REG
=
PC
=
If REG
≠
PC
=
WREG;
Address (EQUAL)
WREG;
Address (NEQUAL)
CPFSGT
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
If skip:
Q1
Forced NOP
Compare f with WREG,
skip if f > WREG
[ label ] CPFSGT f
0 ≤ f ≤ 255
(f) − (WREG),
skip if (f) > (WREG)
(unsigned comparison)
None
0011 0010 ffff ffff
Compares the contents of data memory
location 'f' to the contents of the WREG
by performing an unsigned subtraction.
If the contents of 'f' > the contents of
WREG then the fetched instruction is
discarded and an NOP is executed
instead making this a two-cycle instruc-
tion.
1
1 (2)
Q2
Read
register 'f'
Q3
Execute
Q2
NOP
Q3
Execute
Q4
NOP
Q4
NOP
Example:
HERE
CPFSGT REG
NGREATER :
GREATER :
Before Instruction
PC
=
WREG
=
Address (HERE)
?
After Instruction
If REG
>
PC
=
If REG
≤
PC
=
WREG;
Address (GREATER)
WREG;
Address (NGREATER)
© 1996 Microchip Technology Inc.
DS30412C-page 119