| delorie.com/archives/browse.cgi | search |
| From: | tgamblin AT telusplanet DOT net (tg) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Help with mouse code. |
| Date: | Sun, 22 Feb 1998 04:05:42 GMT |
| Organization: | TELUS Communications Inc. |
| Lines: | 21 |
| Message-ID: | <34efa28a.37678@news.telusplanet.net> |
| Reply-To: | tgamblin AT telusplanet DOT net |
| NNTP-Posting-Host: | mkrvpx01-port-7.agt.net |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I'm trying to figure out how to program the mouse but I've got a
problem. The function below never changes the value of 'pressed', and
I'm not sure why.. The row and cursor are returned ok.
void get_mouse_status(int *pressed, int *column, int *row)
{
asm ("
movw $0x0003,%%ax \n
int $0x33 \n
movw %%bx,%0 \n
movw %%cx,%1 \n
movw %%dx,%2"
:
: "g" (*pressed), "g" (*column), "g" (*row)
: "ax", "bx", "cx", "dx", "memory"
);
}
[tg]
Curiosity only kills cats.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |