STACK SEGMENT STACK
DB 1024 DUP(0)
STACK ENDS
DATA SEGMENT
TABF DW 262,350,352,350,441,393,350,393,441
DW 350,352,441,525,589,588,589,525,441
DW 440,350,393,350,393,441,350,293,294,262
DW 350,589,525,441,440,350,293,350,393,589
DW 525,441,440,525,589,700,525,441,440,350
DW 393,350,393,441,350,294,292,262,350,0
TABT DB 4,4,6,2,4,4,6,2,4,4
DB 6,2,4,4,12,1,3,6,2
DB 4,4,6,2,4,4,6,2,4,4
DB 12,4,6,2,4,4,6,2,4,4
DB 6,2,4,4,12,4,6,2,4,4
DB 6,2,4,4,6,2,4,4,12
DATA ENDS
CODE SEGMENT
ASSUME CS: CODE,DS: DATA
BEG: MOV AX,DATA
MOV DS,AX
OPEN: IN AL,61H
OR AL,00000011B
OUT 61H,AL
AGA: MOV SI,OFFSET TABF
MOV DI,OFFSET TABT
LAST: CMP WORD PTR[SI],0
JE AGA
MOV DX,12H
MOV AX,34DEH
DIV WORD PTR[SI]
OUT 42H,AL
MOV AL,AH
OUT 42H,AL
CALL WAITF
ADD SI,2
INC DI
MOV AH,1
INT 16H
JZ LAST
COLSE: IN AL,61H
AND AL,11111100B
OUT 61H,AL
MOV AH,4CH
INT 21H
WAITF PROC NEAR
PUSH AX
WAITF1:
IN AL,61H
AND AL,10H
CMP AL,AH
JE WAITF1
MOV AH,AL
LOOP WAITF1
POP AX
RET
WAITF ENDP
CODE ENDS
END BEG
|