[comp.os.msdos.programmer] Reading a serial mouse

stu880209@gcc.uucp (If I were any dumber I'd be dead.) (01/29/91)

	This may be a pretty simple question, but how do you read
	information from a serial mouse?  I just purchased one for
	my PC and it works great for my application software, but I'm
	wondering how to access it from Turbo Pascal 5.0, Assembler,
	Turbo Basic, Turbo C, etc.  I imagine its pretty simple, but I
	can't seem to find any info about it in the Turbo
	documentaion or in the mouse documentation.

******************************************************************************
David Ogren		Grove City College
INTERNET:		stu880209%gcc@edinboro.edu
"It doesn't have to work right, it just has to work" -- Mike DeSanto
******************************************************************************

davem@hpmwtd.HP.COM (Dave McQuate) (02/02/91)

The mouse I have simply sends characters at 1200 baud; there's a "packet"-
like structure with a specific indicator for the "first" byte.  One byte
contains a bit to indicate the status of each of the mouse buttons. Other
bytes indicate the number of "ticks" the mouse has moved (x & y) since the
last packet.  If you'd like more info, or even a bit of Turbo-C code,
send me email.  I'll fetch stuff from home.