delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/04/14:03:11

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: <Pine.SGI.3.91.960503101459.21607D-100000@tower.york.ac.uk> (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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019