[ILUG] Membership
Colin Fowler
fowler at indigo.ie
Wed Aug 15 19:59:12 IST 2001
On Wed, 15 Aug 2001 15:22:37 +0100
jac1 <jac1 at student.cs.ucc.ie> wrote:
>On the subject of assembly code, why is linux's inline asm code so goddamn
>cryptic to follow? Is there an advantage to it? Microsoft's inline __asm {} is
>soooooo much easier to read + use.
>
>James
<SNIP HORRIBLE MIPS LOGIC BRANCHING WIERDNESS STUFF>
I have to agree on the "linux's inline asm" bit. AT&T syntax asm sucks badly
(yeah i know about the gas .intel_syntax directive - it still sucks - you still need
to use movw and %eax etc.) If you want to code asm in linux do yourself a favour and
get nasm. The syntax is "intel style" but much more logical than some of the wierdness
TASM and MASM use. Of course you can't imbed it in .c files but nasm can produce elf
object files no problem so you can link. Referencing externals and declaring globals
is easy. Another reason not to use gas is that its not very forgiving of errors as its
really coded to accept proper asm from a compiler.
Get nasm. It rules. Its macro handling is nifty and it's readable code.
awaiting the flames,
Colin Fowler.
P.S vi sucks, emacs sucks - I use ee :)
More information about the ILUG
mailing list