鈫?/div>
PC<12:11>
None
10
0kkk
kkkk
kkkk
Call Subroutine. First, return address
(PC+1) is pushed onto the stack. The
eleven bit immediate address is loaded
into PC bits <10:0>. The upper bits of
the PC are loaded from PCLATH.
CALL
is a two cycle instruction.
Status Affected:
Encoding:
Description:
If bit 'b' in register 'f' is '0' then the next
instruction is executed.
If bit 'b' is '1', then the next instruction is
discarded and a NOP is executed
instead, making this a 2T
CY
instruction.
Words:
Cycles:
Q Cycle Activity:
1
1(2)
Q1
Decode
Words:
Q2
Read
register 'f'
1
2
Q1
Decode
Q3
Process
data
Q4
No-Operat
ion
Cycles:
Q Cycle Activity:
1st Cycle
Q2
Read
literal 'k',
Push PC
to Stack
Q3
Process
data
Q4
Write to
PC
If Skip:
(2nd Cycle)
Q1
Q2
No-Operat
ion
Q3
Q4
2nd Cycle
No-Opera
tion
No-Operati No-Opera No-Operat
on
tion
ion
No-Opera No-Opera No-Operat
tion
tion
ion
Example
HERE
FALSE
TRUE
BTFSC
GOTO
鈥?/div>
鈥?/div>
鈥?/div>
PC =
FLAG,1
PROCESS_CODE
Example
HERE
CALL
THERE
Before Instruction
PC = Address
HERE
After Instruction
address
HERE
PC = Address
THERE
TOS = Address
HERE+1
Before Instruction
After Instruction
if FLAG<1> = 0,
PC =
address
FALSE
if FLAG<1> = 1,
PC =
address
TRUE
漏
1998 Microchip Technology Inc.
DS30430C-page 57
prev
next