From: newhallw AT escmail DOT orl DOT mmc DOT com Date: Tue, 18 Jun 96 09:44:39 EDT Message-Id: <9606181344.AA08406@cvfive> To: djgpp AT delorie DOT com Subject: MouseTrapping: An old problem revisited...in more detail > Well, I did that. But I just called one other function in the interrupt. > And this function modifies a ring buffer with mouse events. No complicated > stuff. I can send some code samples, if you want any. djgpp V1, by the way. > There is a mouse function that can be used to register a user-defined > function that will be called by the mouse driver when certain > user-defined events (such as mouse click or mouse movement) happen. > Isn't this what you are after? If so, then this is doable in DJGPP. I have successfully compiled and ran code which--when the mouse is moved or a button is pressed--calls a function in my DJGPP program that modifes a number of global variables and then returns to "the regularly scheduled program in progress." Yes, that can be done. I've done it, too. What I am interested in doing, however, is having the function called by the mouse interrupt call ANOTHER djgpp function(i.e. to blit a mouse cursor on the screen, draw a line, start rendering a scene, et cetera...) and the problem is that I get gpf's when I try to do this...what I remember(vaguely) from months ago was that a stack swap is required to handle such requests(or something like that) but I need more information on how to do this...