*BSD News Article 49055


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!newshost.marcam.com!usc!howland.reston.ans.net!swrinde!cs.utexas.edu!news.sprintlink.net!in1.uu.net!infoseek.com!nntp-hub.barrnet.net!us.oracle.com!news.caldera.com!park.uvsc.edu!usenet
From: Terry Lambert <terry@cs.weber.edu>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FreeBSD Hardware Status
Date: 16 Aug 1995 03:47:34 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 59
Message-ID: <40rpom$sa1@park.uvsc.edu>
References: <DDAL0I.D75@seas.ucla.edu> <40orni$6os@park.uvsc.edu> <jcaron-1508951330120001@mon2-09.planete.net>
NNTP-Posting-Host: hecate.artisoft.com

jcaron@pressimage.net (Jacques Caron) wrote:
] >The Problem being that it uses the second channel on the keyboard
] >controller, and not all systems support it.  Without a reasonable
] >way to probe for existance, this is going to contiune to be an
] >issue.
] 
] Did anyone ever try to check out how MSD (the MS-DOS Diagnostics program)
] or MOUSE.COM find out about the existence of a PS/2 mouse without breaking
] everything?
] 
] I guess I'll have to learn to read 80x86 code... [and find a disassembler].

No need to do that.

They examine the equipment word at 40:10h.  For all systems after
the XT, bits are decoded as:

0	Boot diskette drive installed
1	math coprocessor
2	mouse port on system board		<-- XXXXXXXXXXXX
4+5	0 0	EGA
	1 0	Color 40x25
	0 1	Color 80x25
	1 1	Mono 80x25
6+7	(bit 0 == 1)	0 0	1 floppy
			1 0	2 floppies
9+10+11	(# com ports)	0 0 0	none
			1 0 0	one
			0 1 0	two
			1 1 0	three
			0 0 1	four
13	N/A or internal modem installed (varies)
14+15	($ printer ports)	0 0 	none
				1 0	one
				0 1	two
				1 1	three

This information is filled in via the post routine and would be
retrived in a VM86() environment (which we don't have one of) by
calling INT 11h (post code is returned in AX).


It's also amusing to not that by examining words 40:00, 40:02,
40:04, and 40:06, one can find the serial port address ranges
for the first four serial ports, and 40:08, 40:0A, 40:0C for
the first three printer ports (both convolutes operations in
the probe code for the respective drivers).


There's more mouse stuff, but it's all pretty much dependent on
the hardware equipment check based on the BIOS POST routine and
the assumption that the BIOS matches the motherboard.


                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.