Table: Extended 16-Bit Core Control Operations
Hex
|
Mnemonic
|
Description
|
Function
|
E2n
|
BC
|
n
|
Branch if Carry
|
if C=1, PC+2+2*n→ PC, else PC+2→PC
|
E6n
|
BN
|
n
|
Branch if Negative
|
if N=1, PC+2+2*n→PC,else PC+2→PC
|
E3n
|
BNC
|
n
|
Branch if Not Carry
|
if C=0, PC+2+2*n→PC, else PC+2→PC
|
E7n
|
BNN
|
n
|
Branch if Not Negative
|
if N=0, PC+2+2*n→PC, else PC+2→PC
|
E5n
|
BNOV
|
n
|
Branch if Not Overflow
|
if OV=0, PC+2+2*n→PC, else PC+2→PC
|
E1n
|
BNZ
|
n
|
Branch if Not Zero
|
if Z=0, PC+2+2*n→PC, else PC+2→PC
|
E4n
|
BOV
|
n
|
Branch if Overflow
|
if OV=1, PC+2+2*n→PC, else PC+2→PC
|
D'0'n
|
BRA
|
n
|
Branch Unconditionally
|
PC+2+2*n→ PC
|
E0n
|
BZ
|
n
|
Branch if Zero
|
if Z=1, PC+2+2*n→PC, else PC+2→PC
|
ECkk*
Fkkk
|
CALL
|
n,s
|
Call Subroutine 1st word
2nd word
|
PC+4 → TOS, n → PC<20:1>,
if s=1, WREG → WREGs,
STATUS → STATUSs, BSR → BSRs
|
0004
|
CLRWDT
|
|
Clear Watchdog Timer
|
0 → WDT, 0 → WDT postscaler,
1 → TO,1 → PD
|
0007
|
DAW
|
|
Decimal Adjust WREG
|
if WREG<3:0> >9 or DC=1,
WREG<3:0>+6→WREG<3:0>,
else WREG<3:0> → WREG<3:0>;
if WREG<7:4> >9 or C=1,
WREG<7:4>+6→WREG<7:4>,
else WREG<7:4> → WREG<7:4>;
|
EFkk
Fkkk
|
GOTO
|
n
|
Go to address 1st word
2nd word
|
n → PC<20:1>
|
0000
|
NOP
|
|
No Operation
|
No Operation
|
Fxxx
|
NOP
|
|
No Operation
|
No Operation (2-word instructions)
|
0006
|
POP
|
|
Pop top of return stack (TOS)
|
TOS-1 → TOS
|
0005
|
PUSH
|
|
Push top of return stack (TOS)
|
PC +2→ TOS
|
D'1'n
|
RCALL
|
n
|
Relative Call
|
PC+2 → TOS, PC+2+2*n→PC
|
00FF
|
RESET
|
|
Software device reset
|
Same as MCLR reset
|
0010*
|
RETFIE
|
s
|
Return from interrupt
(and enable interrupts)
|
TOS → PC, 1 → GIE/GIEH or PEIE/GIEL,
if s=1, WREGs → WREG, STATUSs → STATUS,
BSRs → BSR, PCLATU/PCLATH unchngd.
|
0012*
|
RETURN
|
s
|
Return from subroutine
|
TOS → PC, if s=1, WREGs → WREG,
STATUSs → STATUS, BSRs → BSR,
PCLATU/PCLATH are unchanged
|
0003
|
SLEEP
|
|
Enter SLEEP Mode
|
0 → WDT, 0 → WDT postscaler,
1 → TO, 0 → PD
|
* Assuming default bit value for s.
|