i~. MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
AJMP addrll
Example
Bytas
Cycles
Encoding:
Operation:
AbsoluteJultlp
AJMP transfers programexecutionto the indicatedaddress,which ia formedat run-timeby
concatenatingthe high-orderfivebits of the PC (afierincrementingthe PC twice),opcodebits
7-5,and the secondbyteofthe instruction.Thedestinationmust thereforebewithinthe same
2K blockof programmemoryas the first byte of the instructionfollowingAJMP.
The label “JMPADR” is at programmemorylocation0123H.The instruction,
AJMP JMPADR
is at location0345Hand willload 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)+ pageaddress
ANL <dest-byte>, <src-byte>
Funotion:
Example:
I.@cal-AND forbyte variables
ANL performsthe bitwiselogical-ANDoperationbetweenthe variablesindicatedand storea
the results in the destinationvariable.No flagsare affected.
Thetwooperandsallowsixaddressingmode combinations.Whenthe 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 instructionis used to modifyan outputport, the valueusedas the original
port data willbe read from the output data latch notthe input pins.
If the AccumulatorholdsOC3H(11OOUHIB)and registerOholds 55H(O1OIO1O1B)then the
instruction,
ANL A,RO
willleave41H(OIOWOOIB)in the Accumulator.
Whenthe destinationis a directlyaddressedbyte,this instructionwillclear combinationsof
bits in SOYRAMlocationor hardwareregister.Themaskbytedeterminingthe pattern of bits
tobe
clearedwouldeitherbea constantcontainedintheinstructionora valuecomputedin
the Accumulatorat run-time.The instruction,
ANL Pl, #Ol110011B
willclear bits 7, 3, and 2 of output port 1.
2-32