www.delorie.com/archives/browse.cgi | search |
Date: | Sat, 17 Oct 1998 15:58:53 -0400 (EDT) |
Message-Id: | <199810171958.PAA04342@indy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp AT delorie DOT com |
CC: | unreinME AT feist DOT com |
In-reply-to: | <362838f6.33923440@news.feist.com> (REMOVEunreinME@feist.com) |
Subject: | Re: mouse mickeys wont go negative |
Reply-To: | djgpp AT delorie DOT com |
> x = 5FFF3, y = FFFB > x = 5FFDC, y = FFDF DOS calls return shorts (16 bits), not longs (32 bits). You can't just mask off the unused bits; you have to cast it to the rightly-sized type so that the sign bit is in the right place. Try: x=(short)x; y=(short)y;
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |