The MASM Forum

Miscellaneous => 16 bit DOS Programming => Topic started by: Manos on May 27, 2012, 08:26:32 PM

Title: Mouse
Post by: Manos on May 27, 2012, 08:26:32 PM
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.
Title: Re: Mouse
Post by: FORTRANS on May 28, 2012, 01:55:17 AM
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.
Title: Re: Mouse
Post by: MichaelW on May 28, 2012, 03:02:59 AM
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.
Title: Re: Mouse
Post by: Manos on May 28, 2012, 03:46:57 AM
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.
Title: Re: Mouse
Post by: vitsoft on July 01, 2012, 11:11:50 PM
Twelve year ago I wrote an utility OPIN.com (http://vitsoft.info/#OPIN) 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 (http://vitsoft.info/opin.zip).

Screenshot:
(http://vitsoft.info/OPINm.png)

Title: Re: Mouse
Post by: MichaelTripi68 on January 02, 2013, 02:24:51 PM
Quote from: vitsoft on July 01, 2012, 11:11:50 PM
Twelve year ago I wrote an utility OPIN.com (http://vitsoft.info/#OPIN) 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 (http://vitsoft.info/opin.zip).

Screenshot:
(http://vitsoft.info/OPINm.png)

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
Title: Re: Mouse
Post by: 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/ (http://www.cs.cmu.edu/~ralf/)

the mouse INT 33h services are easy to learn   :P
Title: Re: Mouse
Post by: MichaelTripi68 on January 02, 2013, 02:51:16 PM
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/ (http://www.cs.cmu.edu/~ralf/)

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

Thanks!!  Will be a great reference for me..
Title: Re: Mouse
Post by: 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 (http://vitsoft.info/vsasmlib.zip). Enjoy  :t
Title: Re: Mouse
Post by: Rockphorr on January 03, 2013, 09:11:52 AM
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 (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
Title: Re: Mouse
Post by: 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.
Title: Re: Mouse
Post by: Rockphorr on January 03, 2013, 09:19:28 AM
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 (http://masm32.com/board/index.php?topic=162.0)
Title: Re: Mouse
Post by: MichaelTripi68 on January 09, 2013, 01:28:36 AM
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: