Mail Archives: djgpp/1999/04/08/08:00:34
From: | "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: parse error before `{'
|
Date: | Wed, 7 Apr 1999 12:18:05 -0600
|
Message-ID: | <01be8122$fb261240$LocalHost@thendren>
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.71.1712.3
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.71.1712.3
|
Reply-To: | djgpp AT delorie DOT com
|
>asm looks a bit wrong, your using the intel syntax where as djgpp uses the
>at/t version, don't ask me any questions about what its like though, I dont
>know much.
exactly, in addition, this needs to be a template.
this should be:
unsigned char outp(short int port, unsigned char value)
{
asm ("
xorw %%ax, %%ax
xorw %%dx, %%dx
movw %0, %%dx
movb %1, %%al
outb %%dx, %%al",
/* no outputs */,
"rm" (port), "rm" (value),
"ax", "dx")
}
read the section in the gcc manual on extended asm. :-)
-={C}=-
- Raw text -