Adding Mouse Support
Adding Mouse Support
I wanted to add mouse support, but it seems that I have to create my own driver or I'm not using int 33h correctly. How do you add mouse support using int 33h or by writing your own driver?
Re:Adding Mouse Support
If your in PMode you can't use those kind of interrupts, and if you are in PMode, you need to write a IDT for IRQs and interrupts to use the Mouse's IRQ and then write a driver.
Re:Adding Mouse Support
I'll help when I figure that out
I'm trying to get mine to run right now.
I'm trying to get mine to run right now.
Re:Adding Mouse Support
I found some stuff at http://www.nondot.org/sabre/os/articles ... ceDevices/
but it still uses int 33h to initialize the driver, is that right?
but it still uses int 33h to initialize the driver, is that right?
Re:Adding Mouse Support
Yes...but that 33h driver runs in Real mode...and you can't use real mode code in PMode unless you use v86...too much to learn when your just starting.
Re:Adding Mouse Support
Oh Ok, I guess I can try to use int 14h to read the COM Port
Re:Adding Mouse Support
Hold on here! If you need to use ints, you need a IDT! And ints are different in PMode! You need v86 if you are running in PMode and want 33h and 14h!
Re:Adding Mouse Support
I'm confused now. I don't even know if I'm in PMode or not now (I switched the resolution I'm in VESA 1.2 800x600 16.2M colors), but I'm using BIOS Interrupts, aren't BIOS Interrupts useable anywhere?
Re:Adding Mouse Support
Ok I get it now, I read a FAQ about PMode and Real Mode, but I See no reason to switch to Protected Mode.
Re:Adding Mouse Support
(It's me tom, with a cookie problem...)
Well...PMode is powerful...protects your OS from apps messing it up....
Well...PMode is powerful...protects your OS from apps messing it up....
Re:Adding Mouse Support
If you switch to protected mode you can use 4GB of ram and protection mechanisms.
If you don't mind being limited to 640K of ram, stay in real mode, all the bios interrupts are available.
I can tell you are wanting to code an OS by starting from the GUI, my opinion is thats a bad choice, everybody starts like that and hits a brick wall very quickly.
Get some books, learn how to REALLY do it!
If you don't mind being limited to 640K of ram, stay in real mode, all the bios interrupts are available.
I can tell you are wanting to code an OS by starting from the GUI, my opinion is thats a bad choice, everybody starts like that and hits a brick wall very quickly.
Get some books, learn how to REALLY do it!
Re:Adding Mouse Support
..
Last edited by Perica on Fri Dec 01, 2006 8:37 pm, edited 1 time in total.