Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!nisc.nyser.net!cmx!top.cis.syr.edu!gefuchs From: gefuchs@top.cis.syr.edu (Gill E. Fuchs) Newsgroups: comp.sys.ibm.pc Subject: Mouse handlers and Turbo c 2.0 Message-ID: <2139@cmx.npac.syr.edu> Date: 13 Dec 89 21:15:20 GMT Sender: usenet@cmx.npac.syr.edu Reply-To: gefuchs@top.cis.syr.edu (Gill E. Fuchs) Organization: CIS Dept., Syracuse University Lines: 50 Hi... I have a simple problem that I have not been able to find answers to in any books. I am trying to use the Microsoft Mouse driver, function 12 (0CH) to set my own handler... for mouse events...(This works fine using a far call) but once an event occurs and the handler is called the handler cannot access any variables outside that routine... Code is as follows typedef MOUSE_EVENT struct M_E { int down,button,x,y;} struct MOUSE_EVENT far *mevent; far handler(void); main() { .... .... mevent->down=0; setup_handler(....); loop: while (mevent->down==0) then goto loop; ..... ..... Do_sumthing(); } far handler() { mevent->down=1; mevent->button=_BX; mevent->x=_CX; mevent->y=_DX; } The problem is that mevent->down is not set to 1 after calling the handler. (note that i am using turbo C 2.0) Thankyou for any help out there.... P.S. Anybody out there with the descriptions for dip switch settings for an Epson Rx-80 F/T...I have lost the manual and need to adjust them... Thankyou once again... Vahid Koussari Gefuchs@top.cis.syr.edu