
PIC17C4X
DS30412C-page 114
1996 Microchip Technology Inc.
ANDWF
AND WREG with f
Syntax:
[
label ] ANDWF
f,d
Operands:
0
≤ f ≤ 255
d
∈ [0,1]
Operation:
(WREG) .AND. (f)
→ (dest)
Status Affected:
Z
Encoding:
0000
101d
ffff
Description:
The contents of WREG are AND’ed with
register 'f'. If 'd' is 0 the result is stored
in WREG. If 'd' is 1 the result is stored
back in register 'f'.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register 'f'
Execute
Write to
destination
Example:
ANDWF
REG, 1
Before Instruction
WREG
=
0x17
REG
=
0xC2
After Instruction
WREG
=
0x17
REG
=
0x02
BCF
Bit Clear f
Syntax:
[
label ] BCF
f,b
Operands:
0
≤ f ≤ 255
0
≤ b ≤ 7
Operation:
0
→ (f<b>)
Status Affected:
None
Encoding:
1000
1bbb
ffff
Description:
Bit 'b' in register 'f' is cleared.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register 'f'
Execute
Write
register 'f'
Example:
BCF
FLAG_REG,
7
Before Instruction
FLAG_REG = 0xC7
After Instruction
FLAG_REG = 0x47