i~. M=@-51 PROGRAMMER’SGUIDEAND INSTRUCTION SET
MOV <dest-byte>,<erc-byte>
Function:
Oeacription:
Example:
MOV A,Rn
Bytes:
Cycles:
Encoding:
Operation:
*MOV A,direct
Bytes:
Cycles:
Encoding:
Operation:
Movebytevmiable
Thebyte
variableindicatedby the secondoperandis copiedintothe locationspecifiedby the
first operand.The sourcebyte is not affeeted.No other registeror flagis at%eted.
This is by far the mmt flexibleoperation.Fifteen combinationsof source and destination
addressingmodesare allowed.
Internal RAM location 30H holds 40H.The value of RAM location40H is 10H.The data
prcaentat input port 1is 11OO1O1OB(OCAH).
MOV RO,#30H ;RO< = 30H
MOV A,@RO
;A < = 40H
MOV R1,A
;Rl < = 40H
MOV B,@Rl
;B < = 10H
MOV @Rl,Pl
;RAM (4X-I)< = OCAH
MOV P2,PI
;P2 #OCAH
leavesthe value30Hin registerO,40Hin boththe Aecum
ulator andregister1,10Hitsregister
B, and OCAH(11OO1O1OB)both in RAM Ioeation40H and output on port 2.
1
1
1110
lrrr
MOV
(A)+ (RIO
2
1
1110 0101
MOV
directaddress
(A)+ (direct)
MOV~ACC
ie not a valid instruction.
2-52