Makes a sound with a frequency of 1 KHz. Duration is set in dx register, pause in bx. The beep procedure turns on the speaker here and off. And what does the sleep procedure do? By name, it is clear that this is a delay, but the whole process of generating a signal occurs there. Please help me with this code.
beep proc near push dx mov al, 10110110b out 43h, al mov al, 9ah out 42h, al mov al, 4h out 42h, al in al, 61h or al, 00000011b out 61h, al pop bx call sleep in al, 61h and al, 11111100b out 61h, al ret beep endp sleep proc near xor ah, ah int 1ah add dx, bx mov bx, dx _wait: int 1ah cmp dx, bx jb _wait ret sleep endp