You are on page 1of 1

Qz – 1 Name: KEY

EE390
ID No:

Write an efficient program to copy 32 bytes starting from ROM location 1F35H to
External RAM location starting from 1F65H, and to RAM starting from location 30H.

ORG 0
MOV DPH, #1FH
MOV R7, #32
MOV R0, #30H
MOV R1, #35H
MOV R2, #65H
AGAIN: CLR A
MOV DPL, R1
MOVC A, @A+DPTR
INC R1
MOV @R0, A
INC R0
MOV DPL, R2
INC R2
MOVX @DPTR, A
DJNZ R7, AGAIN
HERE: SJMP HERE

You might also like