led动态显示程序讲解
EXTERN PCI_TEST:NEAREXTERN 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
求每步程序解释。谢谢了