gas vs. nasm: which assembler produces the best code?
Both tools translate assembly instructions directly into machine code, but is it possible to determine which one produces the fastest and cleanest code? When you're writing in assembler, you are precisely describing the instructions to generate so it doesn't depend on the assembler. It depends on you. There's a one-to-one correspondence between the mnemonics you write and actual instructions in machine code. I don't know about these two specific tools, but there are some instructions that can be encoded differently: ADD AX,1 is either 05 01 or 81 c0 01 or fe c0 INT 3 is either cc or cd 03 New