
59
Chapter 3 Functions
3.2 Functions
Bit TeST & Clear
Test bit & clear
[ Flag Change ]
[ Description Example ]
[ Related Instructions ] BCLR,BSET,BNOT,BNTST,BTST,BTSTS
dest
bit,R0 bit,R1 bit,R2 bit,R3
bit,A0 bit,A1 [A0] [A1]
base:8[A0] base:8[A1] bit,base:8[SB] bit,base:8[FB]
base:16[A0] base:16[A1] bit,base:16[SB]
bit,base:16
C
bit,base:11[SB]
BTSTC BTSTC
[ Syntax ]
BTSTC dest
[ Selectable dest ]
BTSTC flag
BTSTC 4,Ram
BTSTC 16,Ram:16[SB]
BTSTC [A0]
[ Operation ]
Z
________
dest
C dest
dest 0
[ Function ]
UIOBSZDC
Conditions
Z : The flag is set when
dest
is 0; otherwise cleared.
C : The flag is set when
dest
is 1; otherwise cleared.
• This instruction transfers inverted
dest
to the Z flag and non-inverted
dest
to the C flag. Then it
stores 0 in
dest
.
[ Instruction Code/Number of Cycles ]
Page=
161
Flag
Change
Comentarios a estos manuales