Expt No:1 (A) Rom To Ram Transfer Date: 12 JAN
Expt No:1 (A) Rom To Ram Transfer Date: 12 JAN
Date: 12 JAN
Objectives: To transfer the data from ROM location 200h
to RAM location 40h. Data is VIT UNIVERSITY.
Program:
Label
GO:
HERE:
Execution
Instruction
ORG 0000H
MOV R2,#0EH
MOV R0,#40H
MOV DPTR,#200H
Address/Reg
Data(H)
CLR A
R0 MOVC A,@A+DPTR
0x00
R1 MOV @R0,A 0x00
R2 INC R0
0x00
R3 INC DPTR
0x00
R4 DJNZ R2,GO 0x00
R5 SJMP HERE 0x00
R6 ORG 200H 0x00
R7 DB "VIT UNIVERSITY"
0x00
END
A
Sp
Sp_max
Before
dptr
0x00
0x00
0x07
0x0200
After
MEMORY:
Execution
Address/Reg
Data(H)
R0
R1
R2
R3
R4
R5
R6
R7
A
Sp
Sp_max
0x4e
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x59
0x07
0x07
Observation:
RESULT: the data was transferred from 200H location of ROM to RAM
location 40h.