⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e10.asm

📁 单片机汇编例程学习,大量的汇编例程
💻 ASM
字号:
;///////////////////////////////////////////
;本程序源代码由单片机培训网提供.
;单片机培训网,让更多人学习单片机更容易.
;第一网址----www.mcuedu.com
;第二网址----http://51_train.nease.net
;创办人------刘永忠
;热线电话----(0755)27529998
;email-------aa815@163.com
;试编一查表程序,从首地址为2000H、长度为100H的数据块中找出ASCII码A,将其地址送到20A0H和20A1H单元中。
;程序难易等级--------稍难
;///////////////////////////////////////////


;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
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -