i want to write a PS/2 mouse driver... in PASCAL



the problem is - that i never writed any driver, neither DOS nor Windows...
So, i dont know where to start

I was thinking of hooking the driver to CMOS real time clock (for "refreshing" the position of mouse) and to INT 33h.
I hope, that I dont corrupt CMOS with this operation


But, straight to this:
I've downloaded a pin scheme for PS/2:

1. Unused
2. +5 volts (to power the chip and LEDs)
3. Unused
4. Clock
5. Ground
6. Data
And what with that now?
PS/2 mouse is a bus mouse. Pheew, I cant handle that. I've searched, what kind of port uses PS/2 mouse. No such luck - only IRQ 12. What with it ??
Or let BIOS do hard work?
Can yo help me??
inflater