请按下列要求传送数据:[设内RAM(20H)=ABH,外RAM(4000H)=CDH,ROM(4000H)=EFH]
1个回答
展开全部
【答案】::
MOV A,20H ;读内RAM 20H,A=ABH
MOV R0,# 20H ;置外RAM间址,R0=20H
MOVX @R0,A ;写外RAM 20H,外RAM(20H)=ABH$:
MOV A,20H ;读内RAM 20H,A=ABH
MOV DPTR,# 2020H ;置外RAM间址,DPTR=2020H
MOVX @DPTR,A ;写外RAM 2020H,外RAM(2020H)=ABH$:
MOV DPTR,#4000H ;置外RAM间址,DPTR=4000H
MOVX A,@DPTR ;读外RAM 4000H,A=CDH
MOV 20H,A ;存内RAM 20H,内RAM(20H)=CDH$:
MOV DPTR,# 4000H ;置外RAM间址,DFTR=4000H
MOVX A,@DPTR ;读外RAM 4000H,A=CDH
MOV DPTR,# 1000H ;修改外RAM间址,DPTR=1000H
MOVX @DPTR,A ;写外RAM 1000H,外RAM(1000H)=CDH$:
MOV DPTR,# 4000H ;置基址4000H,DPTR=4000H
MOV A,#00H ;置变址0,A=0
MOVC A,@A+DPTR ;读ROM 4000H,A=EFH
MOV R0,# 20H ;置外RAM间址,R0=20H
MOVX @R0,A ;写外RAM 20H,外RAM(20H)=EFH$:
MOV DPTR,# 4000H ;置基址4000H,DPTR=4000H
MOV A,#00H ;置变址0,A=0
MOVC A,@A+DPTR ;读ROM 4000H,A=EFH
MOV 20H,A ;存内RAM 20H,内RAM(20H)=EFH
MOV A,20H ;读内RAM 20H,A=ABH
MOV R0,# 20H ;置外RAM间址,R0=20H
MOVX @R0,A ;写外RAM 20H,外RAM(20H)=ABH$:
MOV A,20H ;读内RAM 20H,A=ABH
MOV DPTR,# 2020H ;置外RAM间址,DPTR=2020H
MOVX @DPTR,A ;写外RAM 2020H,外RAM(2020H)=ABH$:
MOV DPTR,#4000H ;置外RAM间址,DPTR=4000H
MOVX A,@DPTR ;读外RAM 4000H,A=CDH
MOV 20H,A ;存内RAM 20H,内RAM(20H)=CDH$:
MOV DPTR,# 4000H ;置外RAM间址,DFTR=4000H
MOVX A,@DPTR ;读外RAM 4000H,A=CDH
MOV DPTR,# 1000H ;修改外RAM间址,DPTR=1000H
MOVX @DPTR,A ;写外RAM 1000H,外RAM(1000H)=CDH$:
MOV DPTR,# 4000H ;置基址4000H,DPTR=4000H
MOV A,#00H ;置变址0,A=0
MOVC A,@A+DPTR ;读ROM 4000H,A=EFH
MOV R0,# 20H ;置外RAM间址,R0=20H
MOVX @R0,A ;写外RAM 20H,外RAM(20H)=EFH$:
MOV DPTR,# 4000H ;置基址4000H,DPTR=4000H
MOV A,#00H ;置变址0,A=0
MOVC A,@A+DPTR ;读ROM 4000H,A=EFH
MOV 20H,A ;存内RAM 20H,内RAM(20H)=EFH
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询