intd.
MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
CLR A
Function:
Description:
Example:
Bytee:
Cyclea:
Encoding:
Operation:
CLR bit
Clear A
ecunlulator
The Aecunmlatoris cleared(all bits set on zero).No flagsare affeeted.
The A
ccumulatorcontsins5CH (010111OOB).The instruction,
CLR A
will leavethe Accumulatorset to OOH(~
B).
1
1
1110
0100
CLR
(A) + O
Function:
Description:
Example:
CLR C
Bytea:
cycle=
Encoding:
Operation:
CLR bit
Bytea:
Cyclea:
Encoding:
Operation:
Clear
bit
Theindicatedbit iscleared(reset tozero).No otherflagsare atkted. CLRean operateonthe
CSITYtig or any directlyaddressablebit.
Port 1has previouslybeen written with 5DH (O1O111O1B).The instruction,
CLR P1.2
willleavethe port set to 59H (O1O11CK)1B).
1
1
I
1100 0011
I
CLR
(c)+ o
2
1
1 100 0010
CLR
(bit) + O
I bitaddress I
2-37