File:  [RetroPC.NET] / np2 / romimage / BEEP.X86
Revision 1.2: download - view: text, annotated - select for diffs
Thu Jan 29 08:36:13 2004 JST (21 years, 9 months ago) by yui
Branches: MAIN
CVS tags: VER_0_82_x64, VER_0_82, VER_0_81A, VER_0_81, VER_0_80, VER_0_79, VER_0_78, VER_0_77, VER_0_76, VER_0_75, VER_0_74, HEAD
fix i286x (T.Yui)

; BEEP TEST

beeptestwait:	mov		al, 4
beeptestwaitlp1:mov		cx, 9000h
				loop	$						; mine
				dec		al
				jne		beeptestwaitlp1
				ret

BEEP_TEST:		mov		bx, 3e6h				; 2.0MHz
				in		al, 42h
				test	al, 20h
				jne		short beephzok
				mov		bx, 4cdh				; 2.5MHz
beephzok:		mov		al, 76h
				out		77h, al					; BEEP setup mode#0

				cmp		byte ptr ds:[MACTYPE], 0
				jne		short beep_Hzset

				call	beep_Hzset
				mov		al, 6
				out		37h, al					; BEEP ON
				call	beeptestwait
				shl		bx, 1
				call	beep_Hzset
				call	beeptestwait
				mov		al, 7
				out		37h, al					; BEEP OFF
				shr		bx, 1
beep_Hzset:		mov		al, bl
				out		73h, al
				mov		al, bh
				out		73h, al
				ret

RetroPC.NET-CVS <cvs@retropc.net>