51单片机汇编程序实例二

	ORG 0000H
	MOV 20H, #9
	MOV DPTR, #BCDTAB
	MOV A, 20H
	MOVC A, @A+DPTR
	MOV 21H, A
	ANL A, #0fh	;逻辑与“按位逻辑与”
	SJMP $
BCDTAB: DB 00H, 01H, 04H, 09H, 16H, 25H
DB 36H, 49H, 64H, 81H
	END

 

posted @ 2018-08-04 12:13  wdliming  阅读(220)  评论(0编辑  收藏  举报