include	clib.inc
include	dos.inc
include	conio.inc

PPROC	beep, __hz:word, __time:word
	mov	ax,word ptr console
	and	ax,CON_UBEEP
	jz	beep_end
	mov	bx,__hz
	mov	dx,__time
	mov	ax,00B6h
	out	43h,al
	mov	ax,0
	out	42h,al
	mov	ax,bx
	out	42h,al
	mov	al,4Fh
	out	61h,al
	push	dx
	call	delay
	mov	al,4Dh
	out	61h,al
    beep_end:
	ret
PEND	beep

	END
