Advance Information
UM-TM57PA20&40_E
8 Bit Microcontroller
28
tenx technology, inc.
Preliminary
Rev 1.3, 2009/10/19
Mnemonic
Op Code
Cycle Flag Affect
Description
Byte-Oriented File Register Instruction
00 0111 dfff ffff
1
C,DC,Z
Add W and "f"
00 0101 dfff ffff
1
Z
AND W with "f"
CLRF f
00 0001 1fff ffff
1 Z
Clear
"f"
00 0001 0100 0000
1 Z
Clear
W
COMF f,d
00 1001 dfff ffff
1 Z
Complement
"f"
00 0011 dfff ffff
1 Z
Decrement
"f"
00 1011 dfff ffff
1 or 2
-
Decrement "f", skip if zero
00 1010 dfff ffff
1 Z
Increment
"f"
INCFSZ f,d
00 1111 dfff ffff
1 or 2
-
Increment "f", skip if zero
00 0100 dfff ffff
1
Z
OR W with "f"
MOVFW f
00 1000 0fff ffff
1
-
Move "f" to W
MOVWF f
00 0000 1fff ffff
1
-
Move W to "f"
MOVWR r
00 0000 00rr rrrr
1
-
Move W to "r"
RLF f,d
00 1101 dfff ffff
1
C
Rotate left "f" through carry
00 1100 dfff ffff
1
C
Rotate right "f" through carry
SUBWF f,d
00 0010 dfff ffff
1
C,DC,Z
Subtract W from "f"
SWAPF f,d
00 1110 dfff ffff
1
-
Swap nibbles in "f"
TESTZ f
00 1000 1fff ffff
1
Z
Test if "f" is zero
00 0110 dfff ffff
1
Z
XOR W with "f"
Bit-Oriented File Register Instruction
01 000b bbff ffff
1
-
Clear "b" bit of "f"
BSF f,b
01 001b bbff ffff
1
-
Set "b" bit of "f"
BTFSC f,b
01 010b bbff ffff
1 or 2
-
Test "b" bit of "f", skip if clear
BTFSS f,b
01 011b bbff ffff
1 or 2
-
Test "b" bit of "f", skip if set
Literal and Control Instruction
ADDLW k
01 1100 kkkk kkkk
1
C,DC,Z
Add Literal "k" and W
ANDLW k
01 1011 kkkk kkkk
1
Z
AND Literal "k" with W
CALL k
10 kkkk kkkk kkkk
2
-
Call subroutine "k"
00 0000 0000 0100
1
TO,PD
Clear Watchdog/Wakeup Timer
GOTO k
11 kkkk kkkk kkkk
2
-
Jump to branch "k"
IORLW k
01 1010 kkkk kkkk
1
Z
OR Literal "k" with W
01 1001 kkkk kkkk
1
-
Move Literal "k" to W
00 0000 0000 0000
1 -
No
operation
00 0000 0100 0000
2 -
Return
from
subroutine
00 0000 0110 0000
2
-
Return from interrupt
RETLW k
01 1000 kkkk kkkk
2
-
Return with Literal in W
00 0000 0000 0011
1 TO,PD
Go into standby mode, Clock
oscillation stops
01 1111 kkkk kkkk
1
Z
XOR Literal "k" with W