|
PIC18F44J50-I Datasheet, PDF (481/562 Pages) Microchip Technology – 28/44-Pin, Low-Power, High-Performance USB Microcontrollers | |||
|
◁ |
PIC18F46J50 FAMILY
SUBFSR
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Subtract Literal from FSR
SUBFSR f, k
0 ï£ k ï£ 63
f ï [ 0, 1, 2 ]
FSRf â k ï® FSRf
None
1110 1001 ffkk kkkk
The 6-bit literal, âkâ, is subtracted
from the contents of the FSR
specified
by âfâ.
1
1
Q2
Read
register âfâ
Q3
Process
Data
Q4
Write to
destination
Example:
SUBFSR 2, 0x23
Before Instruction
FSR2 = 03FFh
After Instruction
FSR2 = 03DCh
SUBULNK
Subtract Literal from FSR2 and Return
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
SUBULNK k
0 ï£ k ï£ 63
FSR2 â k ï® FSR2,
(TOS) ï®ï PC
None
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 0x23
Before Instruction
FSR2 = 03FFh
PC
= 0100h
After Instruction
FSR2 =
PC
=
03DCh
(TOS)
ï£ 2011 Microchip Technology Inc.
DS39931D-page 481
|
▷ |