News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Mouse

Started by Manos, May 27, 2012, 08:26:32 PM

Previous topic - Next topic

Manos

This is an example of Mouse in video mode 320x200x256 colors
for the standard VGA video modes.

Press left button of mouse and move the mouse.
To exit, first press right button of mouse
and then press space key of keyboard.

Manos.

FORTRANS

Hi,

   Not bad.  I would change your   JNE   LOOP1  to JNE     LOOP2,
only as that does not lock up the program.  I would also reset
the video mode to 3 (text) before exiting.

Cheers,

Steve N.

MichaelW

And if this code is supposed to work under DOS, I think the code should display an error message if the reset mouse function fails, because this probably indicates that there is no mouse driver loaded.
Well Microsoft, here's another nice mess you've gotten us into.

Manos

This is a piece of code to see how mouse works, not a program and it is for Windows 95 and later,
not for plain DOS.
If you are interesting to see code out of DOS, using ports, I can upload some code with mouse driver
of my simple OS, but it is writen in FASM.
Maybe, later I 'll upload code using JWASM.

Manos.

vitsoft

Twelve year ago I wrote an utility OPIN.com which can display the values of DOS registers as returned from mouse interrupt 0x33 in real time.  It works in DOS and Windows 32bit.
Download here.

Screenshot:



MichaelTripi68

Quote from: vitsoft on July 01, 2012, 11:11:50 PM
Twelve year ago I wrote an utility OPIN.com which can display the values of DOS registers as returned from mouse interrupt 0x33 in real time.  It works in DOS and Windows 32bit.
Download here.

Screenshot:


Can you provide source code for your OPIN.COM mouse program?  I am playing around with some DOS 16-bit programming.  Thanks in advance.

Mike

dedndave

if you want to play with 16-bit code, you will want Ralf Brown's Interrupt List
http://www.cs.cmu.edu/~ralf/

the mouse INT 33h services are easy to learn   :P

MichaelTripi68

Quote from: dedndave on January 02, 2013, 02:27:18 PM
if you want to play with 16-bit code, you will want Ralf Brown's Interrupt List
http://www.cs.cmu.edu/~ralf/

the mouse INT 33h services are easy to learn   :P

Thanks!!  Will be a great reference for me..

vitsoft

Quote from: MichaelTripi68 on January 02, 2013, 02:24:51 PM
Can you provide source code for your OPIN.COM mouse program?  I am playing around with some DOS 16-bit programming.  Thanks in advance.
Mike

OK, download it again, it is bundled with TASM source now. You will also need some macrolibraries to compile, available at http://vitsoft.info/vsasmlib.zip. Enjoy  :t

Rockphorr

Quote from: vitsoft on January 03, 2013, 08:40:46 AM
Quote from: MichaelTripi68 on January 02, 2013, 02:24:51 PM
Can you provide source code for your OPIN.COM mouse program?  I am playing around with some DOS 16-bit programming.  Thanks in advance.
Mike

OK, download it again, it is bundled with TASM source now. You will also need some macrolibraries to compile, available at http://vitsoft.info/vsasmlib.zip. Enjoy  :t

Are you dos-toys developer too ??

Today at Moscow day time i will post my new draft-dos-text-editor
May be it will be intresting to you

vitsoft

Nor dos-anything developer neither dos user any more.  But its nice to know that such people still exist.

Rockphorr

Quote from: vitsoft on January 03, 2013, 09:15:34 AM
Nor dos-anything developer neither dos user any more.  But its nice to know that such people still exist.

Yes it is not seriously, but try some ideas in dos-emuls are cool.
my toy here http://masm32.com/board/index.php?topic=162.0

MichaelTripi68

Thanks guys....vit, rock, and dave..for all info....I will check out the source provided.  I want to be able to code my own mouse routines into my project so I will use as reference if its ok with you Mr. "Vitsoft"   :bgrin: