;sound--Makes a sound with the speaker
prognam segment

main proc far
	assume cs:prognam,ds:prognam
	org 100h
start:	mov	dx, 100	    ;turn on /off 100 times
	in	al, 61h		;get port 61h
	and	al, 11111100b	;AND off bits 0,1
sound:	xor	al, 10		;toggle bit 1
	out	61h,al		;output to port 61h
	mov	cx,140		;value of wait
wait1:	loop	wait1		;delayed a while
	dec	dx		;total 100 times
	jne	sound
	int	20h		;return
main    endp

prognam ends
	end start
