簡(jiǎn)單MCS-51單片機(jī)程序指令、尋址方式及結(jié)果分析
在MCS-51單片機(jī)的片內(nèi)RAM中,已知(30H)=38H,(38H)=40H,(40H)=48H,(48H)=90H。請(qǐng)說(shuō)明下面各是什么指令和尋址方式,以及每條指令執(zhí)行后目的操作數(shù)的結(jié)果。
MOV A,40H ;數(shù)據(jù)傳送,直接尋址,(A)=48H
MOV R0,A ;數(shù)據(jù)傳送,寄存器尋址,(R0)=48H
MOV P1,#0FH ;數(shù)據(jù)傳送,立即數(shù)尋址,(P1)=0FH
MOV @R0,30H ;數(shù)據(jù)傳送,直接尋址,(48H)=38H
MOV DPTR,#1234H ;數(shù)據(jù)傳送,立即數(shù)尋址,(DPTR)=1234H
MOV 40H,30H ;數(shù)據(jù)傳送,直接尋址,(40H)=38H
MOV R0,38H ;數(shù)據(jù)傳送,直接尋址,(R0)=40H
MOV P0,R0 ;數(shù)據(jù)傳送,直接尋址,(P0)=40H
MOV 28H,#30H ;數(shù)據(jù)傳送,立即數(shù)尋址,(28H)=30H
MOV A,@R0 ;數(shù)據(jù)傳送,寄存器間接尋址,(A)=38H
編輯:admin 最后修改時(shí)間:2018-05-19