Professional Documents
Culture Documents
Microprocessors and Microcontrollers
Microprocessors and Microcontrollers
Name:- Kannan D
Register no. :- 22BEC1284
Slot:- E2+TE2
Question:-
The memory location 3FH has 55H and the external RAM location FF00H has
AAH. Write an 8051 ALP to exchange the content of Internal RAM location
and External RAM location.
Code:-
ORG 0000H
MOV DPTR, 3FH ; Load address of internal RAM location into DPTR
MOV A, @DPTR ; Load content of internal RAM location into accumulator
MOV R0, A ; Move content of internal RAM location to register R0
MOV DPTR, FF00H ; Load address of external RAM location into DPTR
MOV A, @DPTR ; Load content of external RAM location into accumulator
MOV @R0, A ; Move content of external RAM location to internal RAM location