cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/25/16:15:38

Message-ID: <35E31730.A713ECD3@mail.bip.net>
From: Conan <Dr DOT Conan AT mail DOT bip DOT net>
Reply-To: Dr DOT Conan AT Technologist DOT com
Organization: Apocalypse Inc.
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: mouse input ?
References: <35E2AD4A DOT 739546CF AT nordnet DOT fr>
Lines: 42
Date: Tue, 25 Aug 1998 20:00:33 GMT
NNTP-Posting-Host: 130.244.176.113
NNTP-Posting-Date: Tue, 25 Aug 1998 22:00:33 MET DST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Xavier DUBOZ wrote:

> I would like to know what is the syntaxe for mouse's input

   Here is a copy of my mouse driver!
//init stuff:
Regs.x.ax=2;
__dpmi_int(0x33,&Regs); //hide cursor
Regs.x.ax=4;
Regs.x.cx=600;
Regs.x.dx=400;
__dpmi_int(0x33,&Regs); //set mousepos
mouseX=600;
mouseY=400;

Regs.x.ax=7;
Regs.x.cx=0<<3;  // take coordinate times 8 (This is a problem i hawe,
meady you can solve it for me? the mouse mover 8 stepps at a time)
Regs.x.dx=320<<3;
__dpmi_int(0x33,&Regs); //set xboundaries
Regs.x.ax=8;
Regs.x.cx=0<<3;
Regs.x.dx=200<<3;
__dpmi_int(0x33,&Regs); //set yboundaries



and then read from the mouse! :
        Regs.x.ax=3;
        __dpmi_int(0x33,&Regs);
        mouseX=Regs.x.cx>>3;
        mouseY=Regs.x.dx>>3;
                if(Regs.x.bx & 1)
left button pressed
                if(Regs.x.bx & 2)
right button pressed
               if(Regs.x.bx & 4)
middle button pressed




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019