flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
dosin 10 Oct 2009, 01:46
This Fasm Browser written by Dex4u :
it is not complete but does have mouse Functions you could learn from.. also many other PM Functions.. http://dex4u.com/FAB/ Download the FABsource.zip look under Functions - MouseDraw ,MouseData, and the MouseLib Its not well documented but if you have questions about any code I am sure there is someone here that could help! |
|||
![]() |
|
binary 10 Oct 2009, 02:11
Thank you for the fast reply! Now I'm looking through the source code...
|
|||
![]() |
|
bitshifter 10 Oct 2009, 02:39
Dex4u had also done a simple version for MiniDOS.
This was the latest link i had, IDK if it work4u? http://www.dex4u.com/tuts/MouseDemo.zip |
|||
![]() |
|
binary 10 Oct 2009, 16:43
I looked at both examples and compared them with MenuetOS and KolibriOS mouse drivers and from what I understand , in order to use the mouse I need a Setup section of code , a section of reading the data that comes from the mouse after it's initialized , and a section to display the cursor.
The fist section is something like: Mouse Set Up: ... RET Keyboard Read: ... RET Keyboard Write: ... RET Keyboard Command: ... RET ... and I kind of understood that. I can manage the third section. Now the second section of code is the problem. - After I call the "Mouse Set Up:" part what do I need to do to receive the 3 bytes from the mouse? - Do I really need an IDT for this and why? - Why the keyboard must be disabled when I read the output from the mouse? PS:I just want to get the mouse working for now , I'll have time to study all the aspects of it later. Thanks again! |
|||
![]() |
|
edfed 10 Oct 2009, 17:45
you need to preocess the mouse interrput.
i don't know if it is the same as keyboard. each int, you receive a new byte. you find the first one who have a bit always set to indicate it is the first. |
|||
![]() |
|
dosin 10 Oct 2009, 18:57
See here:
http://www.computer-engineering.org/ps2mouse/ under Command Set: E9h This article explains the mouse.. Quote:
I dont think you do.. you can enable the mouse.. but to get it to move you would need a loop to track the movement... and update the screen pos.. for testing.. but for an OS you would want to program an IDT |
|||
![]() |
|
dosin 11 Oct 2009, 02:32
I just found this.. I have not tested it.. but its a simple mouse program..
with out using IDT.... loops like I was talking about above.. looks like what you were looking for: http://www.programmersheaven.com/download/36764/download.aspx its realmode example but should work for pm.. |
|||
![]() |
|
binary 11 Oct 2009, 17:04
wow! how did you found this , I thought i searched the whole Internet.
It's exactly what I was looking for. I tested it in p mode ( with some adjustments )and it works. Thanks! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.