8051 Assembly Ref
8051 Assembly Ref
Direct addressing
Immediate Addressing
Numbers(bin,hex,dec)
Indirect Addressing
R0 R1
PSW
Addressing Methods for the above blocks
Data Movement
Opcode Mnemonic Description B C Flags
MOVING NUMBERS
74 mov A, # n move into A , a number n(#n) 2 1 P
78+n mov Rn, # n move into a register R0 to R7 (Rn), a number n(#n) 2 1
75 mov add, # n move into a direct address(name) ,a number n(#n) 3 2
76+p mov @ Rp, # n move into an address pointed by R0 or R1( @Rp) , a number n(#n) 2 1
MOVING ACCUMLATOR VALUES
F8+n mov Rn,A move into a register R0 to R7(Rn) the value in A 1 1
F5 mov add,A move into a direct address(name) , the value in A 2 1
F6+p mov @ Rp,A move into an address pointed by R0 or R1 (@Rp) , the value in A 1 1
MOVING REGISTERS VALUES
E8+n mov A,Rn move into A , the value in the register R0 to R7(Rn) 1 1 P
88+n mov add,Rn move into a direct address(name) , the value in the register Rn 2 2
MOVING DIRECT ADDRESSES (NAME) VALUES
E5 mov A,add move into A , the value in the direct address(name) 2 1 P
A8+n mov Rn,add move into a register R0 to R7(Rn),the value in the direct address(name) 2 2
85 mov add1,add2 move into the direct address(name)1, the value in address(name) 2 3 2
A6+p mov @ Rp,add move into an address pointed by R0 or R1 (@Rp),the value in address 2 2
MOVING VALUES IN ADDRESSES POINTED BY R0 AND R1/PSW
E6+p mov A,@Rp move into A , the value in the address pointed by R0 or R1(@Rp) 1 1 P
86+p mov add,@Rp move into the dir. Addr.add, value in the addr. pointed by R0 R1( @Rp) 2 2
ARITHMETIC OPERATIONS
Contact:
[email protected]