ASM code with AT/T syntax

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

ASM code with AT/T syntax

Post by Karlosoft »

Hi, I have problems with the syntax used by gcc compiler in asm blocks (It makes me confused -.-, I have already tried but there are mistakes in my code). Can anyone help me writing the functions for insb, insw, outsb and outsw functions?

An other question, how does AAA instruction work? I mean if I want to emulate it with simpler instructions what are the steps?

Thank you ;)
User avatar
XanClic
Member
Member
Posts: 138
Joined: Wed Feb 13, 2008 9:38 am

Re: ASM code with AT/T syntax

Post by XanClic »

Just a hint: If you can't get used to it at all, you may want to try -masm=intel as a command line option, which tells gcc (and gas) to use the Intel syntax.
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: ASM code with AT/T syntax

Post by Karlosoft »

I know but I'm not sure that the GCC based compiler I'm using (DJGPP) supports it. I will check tomorrow ;)
Hangin10
Member
Member
Posts: 162
Joined: Wed Feb 27, 2008 12:40 am

Re: ASM code with AT/T syntax

Post by Hangin10 »

Karlosoft wrote:An other question, how does AAA instruction work? I mean if I want to emulate it with simpler instructions what are the steps?
Have you tried the pseudo-code from the Intel manual?
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: ASM code with AT/T syntax

Post by Karlosoft »

Thanks, Intel has answers for everything XD
Post Reply