Advance Information
UM-TM57PA20&40_E
8 Bit Microcontroller
35
tenx technology, inc.
Preliminary
Rev 1.3, 2009/10/19
NOP No
Operation
Syntax NOP
Operands -
Operation No
Operation
Status Affected
Z
OP-Code
00 0000 0000 0000
Description No
Operation
Cycle 1
Example NOP
-
RETI
Return from Interrupt
Syntax RETI
Operands -
Operation PC
←
TOS, GIE
←
1
Status Affected
-
OP-Code
00 0000 0110 0000
Description
Return from Interrupt. Stack is POPed and Top-of-Stack (TOS) is loaded
in to the PC. Interrupts are enabled. This is a two-cycle instruction.
Cycle 2
Example
RETFIE
A : PC = TOS, GIE = 1
RETLW
Return with Literal in W
Syntax RETLW
k
Operands
k : 00h ~ FFh
Operation PC
←
TOS, (W)
←
k
Status Affected
-
OP-Code
01 1000 kkkk kkkk
Description
The W register is loaded with the eightbit literal ’k’. The program counter
is loaded from the top of the stack (the return address). This is a two-
cycle instruction.
Cycle 2
Example CALL
TABLE
:
TABLE ADDWF PCL,1
RETLW k1
RETLW k2
:
RETLW kn
B : W = 0x07
A : W = value of k8
RET
Return from Subroutine
Syntax RET
Operands -
Operation PC
←
TOS
Status Affected
-
OP-Code
00 0000 0100 0000
Description
Return from subroutine. The stack is POPed and the top of the stack
(TOS) is loaded into the program counter. This is a two-cycle instruction.
Cycle 2
Example
RETURN
A : PC = TOS