English
Language : 

PIC17C7XX_13 Datasheet, PDF (210/306 Pages) Microchip Technology – High-Performance 8-bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
CPFSLT
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Compare f with WREG,
skip if f < WREG
[ label ] CPFSLT f
0  f  255
(f) –WREG),
skip if (f) < (WREG)
(unsigned comparison)
None
0011 0000 ffff ffff
Compares the contents of data memory
location 'f' to the contents of WREG by
performing an unsigned subtraction.
If the contents of 'f' are less than the
contents of WREG, then the fetched
instruction is discarded and a NOP is
executed instead, making this a
two-cycle instruction.
1
1 (2)
Q2
Read
register 'f'
Q3
Process
Data
Q4
No
operation
If skip:
Q1
No
operation
Q2
No
operation
Q3
No
operation
Q4
No
operation
Example:
HERE
NLESS
LESS
CPFSLT REG
:
:
Before Instruction
PC
=
W
=
Address (HERE)
?
After Instruction
If REG
<
PC
=
If REG

PC
=
WREG;
Address (LESS)
WREG;
Address (NLESS)
DAW
Syntax:
Operands:
Operation:
Decimal Adjust WREG Register
[label] DAW f,s
0  f  255
s  [0,1]
If [ [WREG<7:4> > 9].OR.[C = 1] ].AND.
[WREG<3:0> > 9]
then
WREG<7:4> + 7 f<7:4>, s<7:4>;
If [WREG<7:4> > 9].OR.[C = 1]
then
WREG<7:4> + 6 f<7:4>, s<7:4>;
else
WREG<7:4> f<7:4>, s<7:4>;
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
If [WREG<3:0> > 9].OR.[DC = 1]
then
WREG<3:0> + 6 f<3:0>, s<3:0>;
else
WREG<3:0> f<3:0>, s<3:0>
C
0010 111s ffff ffff
DAW adjusts the eight-bit value in
WREG, resulting from the earlier addi-
tion of two variables (each in packed
BCD format) and produces a correct
packed BCD result.
s = 0: Result is placed in Data
memory location 'f' and
WREG.
s = 1: Result is placed in Data
memory location 'f'.
1
1
Q2
Read
register 'f'
Q3
Process
Data
Q4
Write
register 'f'
and other
specified
register
Example:
DAW REG1, 0
Before Instruction
WREG = 0xA5
REG1 = ??
C
=0
DC
=0
After Instruction
WREG =
REG1 =
C
=
DC
=
0x05
0x05
1
0
DS30289C-page 210
 1998-2013 Microchip Technology Inc.