Date: Sat, 4 May 1996 13:59:55 -0400 From: dj (DJ Delorie) Message-Id: <199605041759.NAA01657@delorie.com> To: slh100 AT york DOT ac DOT uk CC: djgpp AT delorie DOT com In-reply-to: (message from Shawn Hargreaves on Fri, 3 May 1996 10:35:46 +0100) Subject: Re: Newbie probs : hooking keyboard int > > asm(" > > cli ;//Disable interrupts. > > inb $0x60,%al ;//Read the keyboard input. > > ;//(Port 60h is the keyboard port). > > xorw %bx,%bx ;//Clear BX. > > I'm not sure exactly what the rules are for saving and restoring > registers (is this documented anywhere, anyone?) but from examining the Inline assembler uses different rules. You MUST tell gcc which registers you are explicitely using, so that it can make sure those registers are available. The GCC manual describes how to do this.