This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Using 10 year old version of gas
- To: binutils at sourceware dot cygnus dot com
- Subject: Using 10 year old version of gas
- From: Arno Puder <arno at research dot att dot com>
- Date: Sat, 03 Mar 2001 00:01:18 -0800
Hi,
I have a piece of code that I wrote over a decade ago which doesn't
compile with a recent version of gas. Don't ask me which version I was
using; I simply don't know anymore. Here is the code:
unsigned char inportb( short int port )
{
unsigned char value;
asm( "inb %1,%0" : "ral=" (value) : "rdx" (port) );
return( value );
}
I try to compile the code for a 386 machine. I use a gcc 2.95.2 and gas
2.9.5. The above code yields the following error message:
inout.c: In function `inportb':
inout.c:9: warning: output constraint `=' for operand 0 is not at the
beginning
/tmp/cckUlS1D.s: Assembler messages:
/tmp/cckUlS1D.s:11: Error: suffix or operands invalid for `in'
Can anyone tell me how this code show look like nowadays?
Thanks,
Arno