The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: funfuny on June 28, 2008, 07:18:53 PM

Title: How can I know the mouse is clicked- assembler
Post by: funfuny on June 28, 2008, 07:18:53 PM
how can I know the mouse is clicked?
1.do I have to use ifinite loop and check every milisecond how much time the mouse was clicked
with int 33h? or there is an interupt who waits untill the user clicks the mouse?
Title: Re: How can I know the mouse is clicked- assembler
Post by: BogdanOntanu on June 28, 2008, 07:43:12 PM
First decide yourself if you want to do this under DOS or Windows OS...

In windows you will get an message to your window procedure. You do not have to wait for a mouse click since windows will notify your code when this event happens.


In DOS I do not care but I guess you can get an IRQ or a notification to avoid busy waiting. If you are interested in DOS then this section of the forum is wrong. There is a section dedicated for DOS 16 bits programming. By posting to the correct section of the forums you help people that want to help you.

Since this is you first post I will give you an advice:

Always put great effort into trying to explain what you want to achieve in great details and simple but clear words.
We do not like to have to read your mind or guess your intention.

If you fail to do this then you might not get any answers.

Welcome to the forums ...

Title: Re: How can I know the mouse is clicked- assembler
Post by: Vortex on June 29, 2008, 07:20:29 AM
Hi funfuny,

Welcome to the forum.

If you wish to control mouse input under windows, have a look at Iczelion's Win32asm tutorial set :

Tutorial 7: Mouse Input (http://win32assembly.online.fr/tut7.html)
Title: Re: How can I know the mouse is clicked- assembler
Post by: funfuny on June 30, 2008, 06:28:47 PM
thank you very much!