CODE SEGMENT
ASSUME CS:CODE
ASTING DB 256 DUP(?)
START: PUSH CS
POP DS
PUSH CS
POP ES
LEA DI,ASTING
CLD
MOV AL,0
MOV CX,256
@1:
STOSB
INC AL
LOOP @1
MOV SI,OFFSET ASTING
MOV CX,100H
LOP: MOV DL,BYTE PTR [SI]
MOV AH,2
INT 21H
MOV AX,1
CALL DELAY_PROC
INC SI
LOOP LOP
MOV AH,4CH
INT 21H
DELAY_PROC PROC NEAR ;延迟子程式, 延迟 ax/18秒
PUSH ES
PUSH DX
MOV DX,40H
MOV ES,DX
MOV DX,ES:[006CH] ;取系统1/18秒计数
ADD DX,AX ; 延时 x/18
DELAY10:
CMP ES:[006CH],DX ;时限到了?
JBE DELAY10 ;没
POP DX
POP ES
RET
DELAY_PROC ENDP
CODE ENDS
END START