Date: Mon, 23 Dec 1996 12:40:43 +0000 From: Bill Currie Subject: Re: Question about hardware interrupts... To: Peter Berdeklis Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <32BE7DCB.37B2@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: Peter Berdeklis wrote: > > static __inline__ int my_disable() > { > int int_state; > __asm__ __volatile__ ( "int $0x31" > : "a" (int_state) > : "a" (0x0900) > : "%eax" ); > return int_state & 1; > } > > static __inline__ int my_enable() > { > int int_state; > __asm__ __volatile__ ( "int $0x31" > : "a" (int_state) > : "a" (0x0901) > : "%eax" ); > return int_state & 1; > } Both ': "a" (int_state)' lines should read ': "=a" (int_state)' otherwise gcc will complain about the output paramter. Bill -- Leave others their otherness.