?? e10.asm
字號(hào):
;///////////////////////////////////////////
;本程序源代碼由單片機(jī)培訓(xùn)網(wǎng)提供.
;單片機(jī)培訓(xùn)網(wǎng),讓更多人學(xué)習(xí)單片機(jī)更容易.
;第一網(wǎng)址----www.mcuedu.com
;第二網(wǎng)址----http://51_train.nease.net
;創(chuàng)辦人------劉永忠
;熱線電話----(0755)27529998
;email-------aa815@163.com
;試編一查表程序,從首地址為2000H、長(zhǎng)度為100H的數(shù)據(jù)塊中找出ASCII碼A,將其地址送到20A0H和20A1H單元中。
;程序難易等級(jí)--------稍難
;///////////////////////////////////////////
;find out the first 'a',then stop.
;the length is 100h.
;the first address is 2000h.
org 0000
ljmp main
org 0030h
main:
lcall subone
ajmp $
;subone use dptr,a,30h,31h
subone:
mov dptr,#2000h
loop:
movx a,@dptr
xrl a,#41h
jnz tt
mov a,30h
mov dptr,#20a0h
movx @dptr,a
mov dptr,#20a1h
mov a,31h
movx @dptr,a
ret
tt: inc dptr
mov 30h,dph
mov 31h,dpl
mov a,31h
cjne a,#00h,loop
ret
end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -