PIC17C75X
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'
Process
Data
Write
register 'f'
and if
specified
WREG
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read literal
'k'<7:0>,
Push PC to
stack
Process
Data
Write to PC
CLRF
FLAG_REG
Example:
Before Instruction
No
No
operation
No
operation
No
operation
FLAG_REG
=
=
0x5A
0x00
operation
After Instruction
FLAG_REG
HERE
CALL THERE
Example:
Before Instruction
PC
=
Address(HERE)
After Instruction
PC
=
Address(THERE)
TOS =
Address (HERE + 1)
1997 Microchip Technology Inc.
DS30264A-page 193