To convert into normal x86 syntax:
1. Remove the % from in front of the registers: movl $LC0, (%esp) => movl $LC0, (esp)
2. Remove the $ from in front of constants: movl $LC0, (esp) => movl LC0, (esp)
3. Change () to : movl LC0, (esp) => movl LC0, [esp]
4. Reverse the order of operands: movl LC0, [esp] => movl [esp], LC0
5. Convert instruction size suffixes into prefixes: mov [esp], dword LC0.
GNU as uses AT&T syntax for compatibility with the original UNIX as. It can assemble normal (Intel) syntax code if you put the directives
before the code in Intel syntax, but gcc can't produce Intel syntax code, so if you're using embedded assembly in your C code, you either have to write in AT&T syntax, or set it to use AT&T syntax after a block of Intel syntax code with .att_syntax.
Thank you chrismane but that is not what I am trying to do.
What I am trying to do is learn to do some simple programming in assembly.
But all I have been able to find for references is either old, or manuals. So I wanted to learn how to create some simple assembly and translate it to nasm. If I can do that I think I will have enough information to use the old references and make them work for me.
This tread is been very useful so far and any additional help would be appreciated.