Page 1 of 1
ASM code with AT/T syntax
Posted: Thu Sep 02, 2010 2:49 pm
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
Re: ASM code with AT/T syntax
Posted: Thu Sep 02, 2010 3:15 pm
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.
Re: ASM code with AT/T syntax
Posted: Thu Sep 02, 2010 3:28 pm
by Karlosoft
I know but I'm not sure that the GCC based compiler I'm using (DJGPP) supports it. I will check tomorrow
Re: ASM code with AT/T syntax
Posted: Thu Sep 02, 2010 3:30 pm
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?
Re: ASM code with AT/T syntax
Posted: Thu Sep 02, 2010 4:11 pm
by Karlosoft
Thanks, Intel has answers for everything XD