PIC17C4X
CALL
Subroutine Call
[ label ] CALL k
0 ≤ k ≤ 4095
CLRF
Clear f
Syntax:
Syntax:
[label] CLRF f,s
Operands:
Operation:
Operands:
Operation:
0 ≤ f ≤ 255
PC+ 1→ TOS, k → PC<12:0>,
k<12:8> → PCLATH<4:0>;
PC<15:13> → PCLATH<7:5>
00h → f, s [0,1]
00h → dest
Status Affected:
Encoding:
None
Status Affected:
Encoding:
None
0010
100s
ffff
ffff
111k
kkkk
kkkk
kkkk
Clears the contents of the specified reg-
ister(s).
s = 0: Data memory location 'f' and
WREG are cleared.
s = 1: Data memory location 'f' is
cleared.
Description:
Subroutine call within 8K page. First,
return address (PC+1) is pushed onto
the stack.The 13-bit value is loaded into
PC bits<12:0>. Then the upper-eight
bits of the PC are copied into PCLATH.
Callis a two-cycle instruction.
Description:
Words:
Cycles:
1
1
See LCALLfor calls outside 8K memory
space.
Q Cycle Activity:
Q1
Words:
Cycles:
1
2
Q2
Q3
Q4
Decode
Read
register 'f'
Execute
Write
Q Cycle Activity:
Q1
register 'f'
and other
specified
register
Q2
Q3
Q4
Decode
Read literal
'k'<7:0>
Execute
NOP
Forced NOP
Example:
NOP
Execute
NOP
CLRF
FLAG_REG
Example:
Before Instruction
HERE
CALL THERE
FLAG_REG
=
=
0x5A
0x00
Before Instruction
After Instruction
FLAG_REG
PC
=
Address(HERE)
After Instruction
PC
=
Address(THERE)
TOS =
Address (HERE + 1)
1996 Microchip Technology Inc.
DS30412C-page 117