Download CC5X User`s guide

Transcript
CC5X - APPENDIX
B Knudsen Data
A3 Assembly Instructions
Assembly: Status:
NOP
MOVWF f
CLRW
Z
CLRF
f
Z
SUBWF f,d C,DC,Z
DECF
f,d
Z
IORWF f,d
Z
ANDWF f,d
Z
XORWF f,d
Z
ADDWF f,d C,DC,Z
MOVF
f,d
Z
COMF
f,d
Z
INCF
f,d
Z
DECFSZ f,d
RRF
f,d
C
RLF
f,d
C
SWAPF f,d
INCFSZ f,d
-
Function:
No operation
f = W;
Move W to f
W = 0;
Clear W
f = 0;
Clear f
d = f - W;
Subtract W from f
d = f - 1;
Decrement f
d = f | W;
Inclusive OR W and f
d = f & W;
AND W and f
d = f ^ W;
Exclusive OR W and f
d = f + W;
Add W and f
d = f;
Move f
d = f ^ 255; Complement f
d = f + 1;
Increment f
Decrement f, skip if zero
Rotate right f through carry bit
Rotate left f through carry bit
Swap halves f
Increment f, skip if zero
BCF
BSF
BTFSC
BTFSS
f,b
f,b
f,b
f,b
f.b
f.b
Bit
Bit
OPTION
SLEEP
CLRWDT
TRIS
RETLW
CALL
GOTO
MOVLW
IORLW
ANDLW
XORLW
f
k
k
k
k
k
k
k
TO,PD
TO,PD
Z
Z
Z
= 0;
Bit clear f
= 1;
Bit set f
test f, skip if clear
test f, skip if set
OPTION = W;
Load OPTION register
Go into standby mode, WDT = 0
WDT = 0;
Clear watchdog timer
Tristate port f (f5,f6,f7)
Return, put literal in W
Call subroutine
Go to address
W = k;
Move literal to W
W = W | k; Incl. OR literal and W
W = W & k; AND literal and W
W = W ^ k; Excl. OR literal and W
Additional for the 14 bit core
ADDLW
SUBLW
RETURN
RETFIE
k
k
-
C,DC,Z
C,DC,Z
-
W = k + W; Add literal to W
W = k - W; Subtract W from literal
Return from subroutine
Return from interrupt
Additional for the Enhanced 14 bit core
ADDWFC
SUBWFB
LSLF
LSRF
ASRF
MOVLB
MOVLP
BRA
BRW
CALLW
f,d
f,d
f,d
f,d
f,d
k
k
k
-
C,DC,Z
C,DC,Z
C,Z
C,Z
C,Z
-
d = f + W + C; Add W and f and Carry
d = f - W - ~C; Subtract W from f with borrow
Logical shift left f
Logical shift right f
Arithmetic shift right f
Move literal to BSR
Move literal to PCLATH
Branch always
Branch forward with WREG (PC = PC + 1 + WREG)
Subroutine call with WREG (PC = PCLATH:WREG)
117