主题:学校实验报告。。。。8253定时/计数器应用实验。。。今晚12点前交。。求高人帮解释下代码
STACK SEGMENT STACK
DW 64 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE
START: PUSH DS
MOV AX,0000H
MOV DS,AX
MOVAX,OFFSETIRQ0
ADD AX,2000H
MOV SI,0020H
MOV [SI],AX
MOV AX,0000H
MOV SI,0022H
MOV [SI],AX
POP DS
MOV AL,0FCH
OUT 21H,AL
MOV AL,15H
OUT 43H,AL
MOV AL,0FFH
OUT 40H,AL
MOV DL,30H
A1: STI
JMP A1
IRQ0: MOV AH,01H
MOV AL,DL
CMP AL,3AH
JNZ A2
MOV AL,0DH
INT 10H
MOV AL,30H
A2: INT 10H
INC AX
MOV DL,AL
MOV AX,0120H
INT 10H
CALL DALLY
MOV AL,20H
OUT 20H,AL
IRET
DALLY: PUSH AX
MOV CX,0100H
A3: MOV AX,0560H
A4: DEC AX
JNZ A4
LOOP A3
POP AX
RET
CODE ENDS
END START
感激不尽
DW 64 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE
START: PUSH DS
MOV AX,0000H
MOV DS,AX
MOVAX,OFFSETIRQ0
ADD AX,2000H
MOV SI,0020H
MOV [SI],AX
MOV AX,0000H
MOV SI,0022H
MOV [SI],AX
POP DS
MOV AL,0FCH
OUT 21H,AL
MOV AL,15H
OUT 43H,AL
MOV AL,0FFH
OUT 40H,AL
MOV DL,30H
A1: STI
JMP A1
IRQ0: MOV AH,01H
MOV AL,DL
CMP AL,3AH
JNZ A2
MOV AL,0DH
INT 10H
MOV AL,30H
A2: INT 10H
INC AX
MOV DL,AL
MOV AX,0120H
INT 10H
CALL DALLY
MOV AL,20H
OUT 20H,AL
IRET
DALLY: PUSH AX
MOV CX,0100H
A3: MOV AX,0560H
A4: DEC AX
JNZ A4
LOOP A3
POP AX
RET
CODE ENDS
END START
感激不尽