From: deanh AT zip DOT com DOT au (Dean) Newsgroups: comp.os.msdos.djgpp Subject: Problems installing mouse handler Date: Wed, 22 Oct 1997 13:08:38 GMT Organization: The Zipsters Lines: 47 Message-ID: <344df950.23766063@news.zip.com.au> NNTP-Posting-Host: 203.62.148.109 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have written a small mouse handler, but have not had a chance to see if it works yet as the code I use to install it does not seem to do anything, here's the function: void mouse_init() { __dpmi_regs regs; interrupt = 0x0C; mx = midx; my = midy; //initialise the mouse driver regs.x.ax = 0; __dpmi_int( 0x33, ®s ); //lock all data and code _go32_dpmi_lock_data( &mx, sizeof(mx) ); //same thing to rest of variables here _go32_dpmi_lock_code( mouse, (unsigned long)((long)__end_mouse - (long)mouse) ); _go32_dpmi_get_protected_mode_interrupt_vector( interrupt, &old_handler ); my_handler.pm_offset = (int)mouse; my_handler.pm_selector = _go32_my_cs(); _go32_dpmi_allocate_iret_wrapper( &my_handler ) _go32_dpmi_set_protected_mode_interrupt_vector( interrupt, &my_handler ) } All that happens is that the cursor appears in the center of the screen and does not move. I put a counter in the actual handler code, but it just stays a 0, indicating the code is not called. I'm sure it's just something simple that I am doing. BTW I tried removing the line 'my_handler.pm_selector = ...', as I had seen some example without it, but it did nothing. Also the program crashes when using cwsdpmi with a SIGSEG. But I suspect that is an error in my VESA code... I would appreciate if you also mailed me the reply, thanks. Thanks for all your help, Dean Harding deanh AT zip DOT com DOT au