delorie.com/archives/browse.cgi | search |
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:4237 |
Path: | news-dnh.mv.net!mv!news.sprintlink.net!news.mindspring.com!usenet |
From: | robhenry AT atl DOT mindspring DOT com (Robert Henry) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Mouse code - What am I doing wrong? |
Date: | Tue, 09 Jan 1996 03:51:43 GMT |
Organization: | MindSpring Enterprises, Inc. |
Lines: | 29 |
Message-ID: | <4cvd2h$etf@brickbat.mindspring.com> |
Reply-To: | robhenry AT atl DOT mindspring DOT com |
NNTP-Posting-Host: | user-168-121-70-97.dialup.mindspring.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I'm trying to use int 33 function C to set up an interrupt handler for the mouse. The following code causes a GPF when int86x is called. What an I doing wrong? void click_handler (_go32_dpmi_registers *r) { } _go32_dpmi_registers regs; _go32_dpmi_seginfo info; void init_mouse(void) { struct SREGS sregs; union REGS inregs, outregs; info.pm_offset = (u_long)click_handler; a=_go32_dpmi_allocate_real_mode_callback_retf(&info, ®s); if(a!=0) abandon_ship("Could not allocate real mode callback for mouse."); inregs.x.ax = 0xC; inregs.x.cx = 0xFFFF; inregs.x.dx = info.rm_offset; sregs.es = info.rm_segment; int86x( 0x33, &inregs, &outregs, &sregs); }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |