.MODEL SMALL
.STACK 1000H
.DATA
T EQU 1000
.CODE
TONE2 MACRO COUNT,DURATION   ;THIS MACRO DO THE SAME WORK AS TONE1  
MOV AL,0B6H
OUT 43H,AL

MOV AX,COUNT
OUT 42H,AL

MOV AL,AH
OUT 42H,AL

IN AL,61H
OR AL,00000011B
OUT 61H,AL

MOV CX,DURATION
CALL DELAY1

IN AL,61H
OR AL,11111100B
OUT 61H,AL

CALL DELAY2

ENDM

.STARTUP

TONE2 6532,T      ;CALL THE MACRO WITH DIFFRENT COUNTS AND DURATIONS IN EACH CALL BELOW
TONE2 7435,T
TONE2 6343,T*2
TONE2 7443,T*2
TONE2 5432,T*2
TONE2 6434,T*2
TONE2 7734,T
TONE2 7397,T
TONE2 6543,T*2
TONE2 7765,T*2
TONE2 7484,T*2
TONE2 4456,T*2
TONE2 4532,T*2
TONE2 6578,T
TONE2 7622,T
TONE2 5675,T*2
TONE2 4698,T*2
TONE2 5231,T*2
TONE2 5780,T*2
TONE2 6897,T
TONE2 4375,T
TONE2 4908,T
TONE2 4805,T*2
TONE2 5532,T*2
TONE2 7685,T*2
TONE2 4500,T*2

MOV AH,4CH
INT 21H

DELAY1 PROC NEAR      ;DELAY PROCEDURS 
lL1:
PUSH CX
MOV CX,40000
L2:
LOOP L2
POP CX
LOOP L1
RET 
DELAY1 ENDP

DELAY2 PROC NEAR
MOV CX,70000
L3:
LOOP L3
RET
DEALY2 ENDP
END

