Search This Blog

Monday, August 8, 2011

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

No comments:

Post a Comment