GAS Syntax
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
GAS Syntax
Is there anything that changes in gcc inline asm when you use Intel syntax.
Google is your best friend here and otherwise search this forum as the subject has only been addressed a few million times before.
gcc -v --help reveals a -masm option
google gcc masm reveals gcc -masm=intel
took about a minute
gcc -v --help reveals a -masm option
google gcc masm reveals gcc -masm=intel
took about a minute
Author of COBOS
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
I decided against intel syntax, here is my outb function
are there any errors?
Code: Select all
void outb(uchar_t in, uint16_t outp)
{
asm("outb %%al,%%dx"
: /*none to pass*/
:"a" (in),"d" (outp));
};
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
It's just weird that you would put one there where none is needed. Thats all.
The cake is a lie | rackbits.com
I think they blew up an satellite once because of a semicolon (or other character) so i would be hesitant with you remark.crazygray1 wrote:What's wrong with the semicolon? It doesn't need to be there but it doesn't cause any problems.ucosty wrote:Looks fine, except for the semicolon at the end.
@solar
Oops, my bad. I should verify before i post
Author of COBOS