标题:led动态显示程序讲解
只看楼主
灰太狼895
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-6-27
 问题点数:0 回复次数:0 
led动态显示程序讲解
EXTERN PCI_TEST:NEAR
EXTERN ADDRESS_USER:WORD
.MODEL SMALL
.DATA
BUF DB 1,2,3,4,5,6,7,8
LPTR DW?
LBIT DB?
LED DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH
        DB 77H,7CH,39H,5EH,79H,71H
SEGADD DW 60H
BITADD DW 63H
MSG0 DB'PRESS ANY KEY TO QUIT!$';
.STACK 100H
.CODE
.STARTUP
CALL PCI_TEST
MOV AH,9
MOV DX,0FFSET MSG0
INT 21H
MOV AX,ADDRESS_USER
ADD SEGADD,AX
ADD BITADD,AX
MOV LPTR,0
MOV LBIT,01H
AGAIN:
CALL DLED
MOV AH,6
MOV DL,0FFH
INT 21H
JZ AGAIN
MOV AH,4CH
INT 21H
DLED:
INC LPTR
AND LPTR,03H
ROL LBIT,1
MOV DX,BITADD
MOV AL,0FFH
OUT DX,AL
MOV BX,LPTR
MOV AL,BUF[BX]
LEA BX,LED
XLAT
NOT AL
MOV DX,SEGADD
OUT DX,AL
MOV AL,LBIT
NOT AL
MOV DX,BITADD
OUT DX,AL
RET
END
求每步程序解释。谢谢了
搜索更多相关主题的帖子: led 动态 
2011-06-27 02:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-344078-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.524254 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved