|
PIC18F66K22-I Datasheet, PDF (471/550 Pages) Microchip Technology – PIC18F87K22 Family Data Sheet | |||
|
◁ |
PIC18F87K22 FAMILY
TSTFSZ
Test f, Skip if 0
Syntax:
TSTFSZ f {,a}
Operands:
Operation:
Status Affected:
0 ï£ f ï£ 255
a ï [0,1]
skip if f = 0
None
Encoding:
Description:
0110 011a ffff ffff
If âfâ = 0, the next instruction fetched
during the current instruction execution
is discarded and a NOP is executed,
making this a two-cycle instruction.
If âaâ is â0â, the Access Bank is selected.
If âaâ is â1â, the BSR is used to select the
GPR bank.
Words:
If âaâ is â0â and the extended instruction
set is enabled, this instruction operates
in Indexed Literal Offset Addressing
mode whenever f ï£ï 95 (5Fh). See
Section 29.2.3 âByte-Oriented and
Bit-Oriented Instructions in Indexed
Literal Offset Modeâ for details.
1
Cycles:
1(2)
Note: 3 cycles if skip and followed
by a 2-word instruction.
Q Cycle Activity:
Q1
Q2
Q3
Decode
Read
register âfâ
Process
Data
If skip:
Q1
Q2
Q3
No
operation
No
operation
No
operation
If skip and followed by 2-word instruction:
Q1
Q2
Q3
No
operation
No
operation
No
operation
No
operation
No
operation
No
operation
Q4
No
operation
Q4
No
operation
Q4
No
operation
No
operation
Example:
HERE TSTFSZ CNT, 1
NZERO :
ZERO :
Before Instruction
PC
=
After Instruction
If CNT
=
PC
=
If CNT
ï¹
PC
=
Address (HERE)
00h,
Address (ZERO)
00h,
Address (NZERO)
XORLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Exclusive OR Literal with W
XORLW k
0 ï£ï k ï£ï 255
(W) .XOR. k ï®ï W
N, Z
0000 1010 kkkk kkkk
The contents of W are XORed with
the 8-bit literal âkâ. The result is placed
in W.
1
1
Q2
Read
literal âkâ
Q3
Process
Data
Q4
Write to
W
Example:
XORLW
Before Instruction
W
= B5h
After Instruction
W
= 1Ah
0AFh
ï£ 2009-2011 Microchip Technology Inc.
DS39960D-page 471
|
▷ |