delorie.com/archives/browse.cgi | search |
Date: | Mon, 23 Dec 1996 12:40:43 +0000 |
From: | Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz> |
Subject: | Re: Question about hardware interrupts... |
To: | Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca> |
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 |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 961219082005 DOT 24763E-100000 AT is> |
<Pine DOT SGI DOT 3 DOT 91 DOT 961220141846 DOT 22234A-100000 AT chinook DOT physics DOT utoronto DOT ca> |
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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |