|Sample Code - PS2 Mouse Driver|
|User Contributed Comments(8)|
|  Ven | 2006-07-14 16:58:26|
I noticed a small bug. When enabling the interrupt with PIC 2, you used 0x21. That's PIC 1. PIC 2 is 0xA1. ;)
|  arkon | 2006-07-15 06:46:04|
a fix was uploaded already.
|  wasim ahmad | 2006-10-17 00:58:12|
this code is not working not in xp and in dos
|  arkon | 2006-10-18 11:24:31|
it is not supposed to work under any windows (ntvdm).
anyways, what's wrong with dos? can you give more details?
|  anna | 2006-10-27 10:51:04|
ok i think i ave tried everithing, it wont work on dos, not xp, nor vista,i have tried to modify 0xa1 by 0x21 doest work either way, all it does in dos is cursor blinking, and it obviuly doesnt detect the mouse, on xp in says a bunch of errors, so coud it be the compiler?, or linker?? do they need special config???
using tc3 and tc 3lite
|  wasim ahmad | 2006-11-01 01:16:59|
i used tc++ 3.0 to compile the code
after this i opened the bin directory and execute the exe
all it does is it as mentioned by "anna" a blinking cursor
i can understand that dos programs run in virtual x86 mode under xp and hence cant have pure hardware interaction
so i booted my pc with a bootable floppy, browsed to that directory and executed it
i found a different result :
cursor blinking continues
the system gets hanged on clicking the mouse button
sir, i will be thankful to u if u will look into the matter and upload a functional mouse code(even in asm) which can run in pure vanilla DOS(i mean bootaing system using DOS bootable disk)
I want mention at last but not least that
"THIS IS THE ONLY WEBSITE I HAVE SEEN SO FAR THAT HAS SUCH A CODE UPLOADED"
HATS OFF FOR THE EFFORT
Hope i will get some reply soon
|  anna | 2006-12-12 17:23:21|
ok after numerus tries I gave up, this just seems to only hang the system up, any how coud it be possible to getted to work under the following bios interruption?
PS/2 Mouse Request (C2h) (int 15h)
The PS/2 Mouse Request BIOS function is called to process an application or operating system
request to read the status of, or control the operation of, the PS/2 mouse.
AH - C2h, indicating the PS/2 Mouse Request Function.
AL - subfunction, as follows:
00h - Enable/Disable mouse.
01h - Reset mouse.
02h - Set sample rate.
03h - Set resolution.
04h - Get mouse type.
05h - Initialize mouse interface.
06h - Get mouse status/set scaling factor.
07h - Register callout address.
BH - sub-subfunction code or parameter for subfunction.
CY - clear if success, else set if failure.
AH - status code, as follows:
00h - no error.
01h - invalid subfunction code (code in AL.)
02h - invalid input value (value in BH.)
03h - I/O communications error.
04h - resend status received from mouse.
05h - no callout address registered.
86h - function not supported (if OPTION_SUPPORT_PS2MOUSE disabled.)
Well I mean the code that you wrote seems fine but it just doesn't seem to work,I think it could be `cause of port numbers,i noticed that some how tha app seems to confuse the keyboarb with the mouse,could that be the problem??
Any how it is the only code in the web. And it think it's awsome to publish this kind of code.:)
by the way ps/2 port isn'ta com port is it?
|  moussa | 2010-04-13 00:38:04|
i want to interface a ps2 mouse with a pic (16f877or 18f452) can anyone help me to write this program in basic language (i am working on proton pluse program)
Comments that will hurt anyone in any way will be deleted.
Don't ask for features, advertise or curse.
If you want to leave a message to the author use the contacts,
if you have any question in relation to your comments please use the forum.
Comments which violate any of these requests will be deleted without further
Use the comment system decently.
Post your comment: