2. Assume that the on chip ROM has a message Wt Also, as you p to copy it from c
ID: 2266227 • Letter: 2
Question
2. Assume that the on chip ROM has a message Wt Also, as you p to copy it from code Write a space into the upper memory space starting at upper RAM, give a copy to PO. (10 points) ORG MOV MoV CLR Move MoV MoV Jz INC INC SJMI SJMP DPT R,"MYDATA R1. A, PO,A B1: caccess the upper memory ;copy from code ROMM istore in upper memory give a copy to PO exit if last byte increment DPTR increment R1 repeat until last byte stay here when finished ,A EXIT RI Bi EXIT 5001H Gannon University" ORG MYDATA: DB ENDExplanation / Answer
7. Assume that the on-chip ROM has a message.
Write a program to copy it from code space into the upper memory space starting at address 80H.
ORG 0
MOV DPTR, #MYDATA
MOV R1, #80H ; access the upper 128 bytes of on-chip RAM
B1 : CLR A
MOVC A, @A+DPTR ; copy from code ROM space
MOV @R1, A ; store in upper RAM space
MOV P0, A ; give a copy to P0
JZ EXIT ; exit if last byte
INC DPTR ; increment DPTR
INC R1 ; increment R1
SJMP B1 ; repeat until the last byte
EXIT : SJMP $ ; stay here when finished
; ........................
ORG 300H
MYDATA : DB "The Promise of World Peace", 0
END
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.