Microchip Technology ARD00330 データシート

ページ / 480
PIC18F87J72 FAMILY
DS39979A-page 380
Preliminary
 2010 Microchip Technology Inc.
 
 
 
 
 
 
SUBFSR
Subtract Literal from FSR 
Syntax:
SUBFSR f, k
Operands:
 k  63
 [ 0, 1, 2 ]
Operation:
FSRf – k 
 FSRf
Status Affected:
None
Encoding:
1110
1001
ffkk
kkkk
Description:
The 6-bit literal ‘k’ is subtracted from 
the contents of the FSR specified 
by ‘f’.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register ‘f’
Process 
Data
Write to 
destination
Example:
SUBFSR 2, 23h
Before Instruction
FSR2
=
03FFh
After Instruction
FSR2
=
03DCh
SUBULNK
Subtract Literal from FSR2 and Return
Syntax:
SUBULNK   k
Operands:
 k  63
Operation:
FSR2 – k 
 FSR2,
(TOS) 
PC
Status Affected:
None
Encoding:
1110
1001
11kk
kkkk
Description:
The 6-bit literal ‘k’ is subtracted from the 
contents of the FSR2. A RETURN is then 
executed by loading the PC with the 
TOS. 
The instruction takes two cycles to 
execute; a NOP is performed during the 
second cycle.
This may be thought of as a special case 
of the SUBFSR instruction, where f = 3 
(binary ‘11’); it operates only on FSR2. 
Words:
1
Cycles:
2
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register ‘f’
Process 
Data
Write to 
destination
No
Operation
No
Operation
No
Operation
No
Operation
Example:
SUBULNK 23h
Before Instruction
FSR2
=
03FFh
PC
=
0100h
After Instruction
FSR2
=
03DCh
PC
=
(TOS)