Intel MCS 51 User Manual page 62

Table of Contents

Advertisement

i~.
MCS@-51PROGRAMMER'SGUIDE AND INSTRUCTION SET
AJMP addrll
Example
Bytas
Cycles
Encoding:
Operation:
AbsoluteJultlp
AJMP transfers program executionto the indicated address,which ia formedat run-time by
concatenatingthe high-orderfivebits of the PC (afier incrementingthe PC twice),opcodebits
7-5,and the secondbyte of the instruction. The destinationmust thereforebe withinthe same
2K block of program memoryas the first byte of the instructionfollowingAJMP.
The label "JMPADR" is at program memory location0123H.The instruction,
AJMP JMPADR
is at location 0345Hand will load the PC with O123H.
.
L
2
alO a9 a8 O
0001
a7 a6 a5 a4
a3 S2 al aO
AJMP
@'cl + (m +
2
(PClo.o)+ page address
ANL
<dest-byte>, <src-byte>
Funotion:
Example:
I.@cal-AND for byte variables
ANL performsthe bitwiselogical-ANDoperation betweenthe variablesindicatedand storea
the results in the destinationvariable. No flags are affected.
The two operandsallowsix addressingmode combinations. W hen the destinationis the Accu-
mulator, the source can w register, direct, regiater-indirec~or immediateaddressing;when
the destinationis a direct address, the source can be the Accumulatoror immediatedata.
Note: When this instruction is used to modify an output port, the value used as the original
port data will be read from the output data latch not the input pins.
If the Accumulatorholds OC3H(11OOUHIB) a nd registerOholds 55H (O1OIO1O1B)
then the
instruction,
ANL A,RO
will leave 41H (OIOWOOIB) in the Accumulator.
When the destinationis a directly addressed byte, this instruction will clear combinationsof
bits in SOY RAM locationor hardware register. The maskbyte determiningthe pattern of bits
to be
clearedwouldeitherbe a constantcontained intheinstruction or a valuecomputed in
the Accumulatorat run-time.The instruction,
ANL Pl, #Ol110011B
will clear bits 7, 3, and 2 of output port 1.
2-32

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents