Advance Information
UM-TM57PE10_E
8-Bit Microcontroller
37
tenx technology inc.
Preliminary
Rev 1.4, 2012/01/19
CALL
Call subroutine "k"
Syntax
CALL k
Operands
k : 000h ~ FFFh
Operation
Operation: TOS ← (PC) + 1, PC.11~0 ← k
Status Affected
-
OP-Code
10 kkkk kkkk kkkk
Description
Call Subroutine. First, return address (PC+1) is pushed onto the stack.
The 12-bit immediate address is loaded into PC bits <11:0>. CALL is a
two-cycle instruction.
Cycle
2
Example
LABEL1 CALL SUB1
B : PC = LABEL1
A : PC = SUB1, TOS = 1
CLRF
Clear "f"
Syntax
CLRF f
Operands
f : 00h ~ 7Fh
Operation
(f) ← 00h, Z ← 1
Status Affected
Z
OP-Code
00 0001 1fff ffff
Description
The contents of register 'f' are cleared and the Z bit is set.
Cycle
1
Example
CLRF FLAG_REG
B : FLAG_REG = 0x5A
A : FLAG_REG = 0x00, Z = 1
CLRW
Clear W
Syntax
CLRW
Operands
-
Operation
(W) ← 00h, Z ← 1
Status Affected
Z
OP-Code
00 0001 0100 0000
Description
W register is cleared and Z bit is set.
Cycle
1
Example
CLRW
B : W = 0x5A
A : W = 0x00, Z = 1
CLRWDT
Clear Watchdog Timer
Syntax
CLRWDT
Operands
-
Operation
WDT/WKT Timer ← 00h
Status Affected
TO, PD
OP-Code
00 0000 0000 0100
Description
CLRWDT instruction clears the Watchdog/Wakeup Timer
Cycle
1
Example
CLRWDT
B : WDT counter = ?
A : WDT counter = 0x00