Question: Modify the TONE.ASM program so that the 0.25-second 1 KHz tones plays five times, once each second. Hint: Use DOS INT 21H Function 2CH (Get
"Modify the TONE.ASM program so that the 0.25-second 1 KHz tones plays five times, once each second. Hint: Use DOS INT 21H Function 2CH (Get Time) to read the system clock. Look for the seconds value to change. When it does, play the 0.25-second tone, then start watching the system clock again, waiting for the seconds to change again. Do this five times."
I wrote this code below but it's not repeating five times. Any suggestions are appreciated!
DELAY PROC NEAR MOV DX,OUTER WAIT1: MOV CX,INNER WAIT2: NOP NOP NOP NOP LOOP WAIT2 DEC DX JNZ WAIT1 ***WAIT3: MOV AH,2CH INT 21H MOV NOW,DH MOV AH,2CH INT 21H CMP NOW,DH *** JZ WAIT3 RET DELAY ENDP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
