Page 1 of 2
Adding Mouse Support
Posted: Mon Dec 23, 2002 1:16 pm
by VitalDragon
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
Posted: Mon Dec 23, 2002 2:21 pm
by jrfritz
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
Posted: Mon Dec 23, 2002 3:07 pm
by VitalDragon
Ok, how would I write the IDT for IRQs and interrupts
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 3:09 pm
by jrfritz
I'll help when I figure that out
I'm trying to get mine to run right now.
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 3:15 pm
by VitalDragon
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?
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 3:19 pm
by jrfritz
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
Posted: Mon Dec 23, 2002 3:21 pm
by VitalDragon
Oh Ok, I guess I can try to use int 14h to read the COM Port
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 3:26 pm
by jrfritz
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
Posted: Mon Dec 23, 2002 3:31 pm
by VitalDragon
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
Posted: Mon Dec 23, 2002 3:57 pm
by cobrab
If you are using BIOS interrupts you are in Real Mode
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 4:21 pm
by jrfritz
Oh my...OS dever dosen't eve know if they are in pmode!
Re:Adding Mouse Support
Posted: Mon Dec 23, 2002 4:29 pm
by VitalDragon
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
Posted: Mon Dec 23, 2002 4:45 pm
by jrfritz(Tom )
(It's me tom, with a cookie problem...)
Well...PMode is powerful...protects your OS from apps messing it up....
Re:Adding Mouse Support
Posted: Tue Dec 24, 2002 4:20 am
by DarylD
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!
Re:Adding Mouse Support
Posted: Tue Dec 24, 2002 5:52 am
by Perica
..