Moving block of data from ROM to RAM

; MOVING BLOCK OF DATA
ORG 0000H       ;
; NEED TO TAKE DATA FROM ROM TO RAM
; FROM 300 TO 302 TO 30 TO 32
; DEFINING DATA POINTER
MOV DPTR, #0300H;
; RESETING A
MOV R2, #00H    ; COUNTER REGISTER
MOV R0, #30H    ;
MOV A, #00H     ;
; AS 3 DATAS SO LOOP OF 3
MOV R7, #03H    ;
LOOP:
MOV A, R2       ;
MOVC A, @A+DPTR ;
MOV @R1,A       ;
MOV R1,A        ;
INC R2          ;
INC R1          ;
DJNZ R7, LOOP   ;
; STORING DATA AT ROM
; SAY FROM 300 TO 302
ORG 300H        ;
DB ‘ABC’        ;
END

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s