单片机片内ROM数据转移到片内RAM
单片机片内ROM数据转移到片内RAM
ORG 0000H
LJMP MAIN
ORG 0030H
DB 01H,02H,03H,04H,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH,0EH,0FH
ORG 1000H
MAIN:
MOV R2,#0FH
MOV R0,#30H ;片内ROM0030H单元数据转至
MOV R1,#30H ;片内RAM0730H单元
MOV DPTR,#0000H
LP:
MOV A,#30H
MOVC A,@A+DPTR
MOV @R1,A
INC R0
INC DPTR
INC R1
DJNZ R2,LP
END