From: "Anthony.Appleyard" Organization: Materials Science Centre To: DJGPP AT delorie DOT com Date: Tue, 6 Jan 1998 08:44:54 GMT Subject: Funny with hooking interrupt 9 in a laptop Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk Message-ID: <1B072592FBF@fs2.mt.umist.ac.uk> Precedence: bulk I have a djgpp v2 C++ program which needs to read the keyboard events raw. I do this by hooking interrupt 9 with _go32_dpmi_get_protected_mode_interrupt_vector and _go32_dpmi_chain_protected_mode_interrupt_vector, and afterwards restoring it with _go32_dpmi_set_protected_mode_interrupt_vector. On a desktop it works OK. But on a laptop the program often runs OK but after the program has exited I get various malfunctions such as Windows jamming on entry. Often, the program exits, normally to a DOS prompt, but after a few seconds without me doing anything else something in the laptop throws an error display like this:- C:\DIV\SPATRL>Invalid TSS in RMCB at eip=107f; flags=3002 eax=01830000 ebx=000020d4 ecx=00000000 edx=00021800 esi=0009fb0c edi=0001c050 ebp=00000000 esp=0000310c cs=2b ds=3b es=b7 fs=33 gs=0 ss=33 error=00b4 C:\DIV\SPATRL> What made that error display? What is a TSS? What is RMCB? Does it happen from the (extra matter in the laptop which translated Fn key combinations into imitations of presses and releases of the missing keys) messing about with interrupt 9 while my program is running and assuming that interrupt 9 still points to its default BIOS value?