delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/15/13:15:44

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: My mouse moves 4 pixels per click!!
Date: Sat, 15 Aug 1998 12:09:17 -0300
Organization: NBTel Internet
Lines: 17
Message-ID: <35D5A49C.A2896B@unb.ca>
References: <35C89877 DOT FA4426BE AT mail DOT bip DOT net>
NNTP-Posting-Host: fctnts13c03.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Conan wrote:

> My mouse moves 4 pixels per click!!
> Whitch function of  interupt 33h fixxes this and with what options?!?
> (I use VESA video mode 101h  640*480)

     Re-initialize your mouse driver after you change the screen mode.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




    Of course, you will have to use 'malloc' if you are using C.  And if you call
this function multiple times, make sure to
'delete[] MyArray' AFTER you delete each part of MyArray.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




 : You get such pages either by calling `sbrk' or by allocating a larger
> : block with `malloc' and using a part thereof whose starting address
> : has its lower 12 bits zeroed.
> Thanks.  I was wondering, but I don't think it's possible:  How about
> mallocing a 128K block, to guarantee getting a whole page in there
> somewhere, then free()ing parts of that block that aren't used?  I presume
> this is not possible...

    All you need to do is sbrk(0x1000-(sbrk(0)&0xFFF));  Then you can use sbrk(n)
to allocate 'n' bytes page-aligned.
--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




- Raw text -


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