|
|
|
|
|
by MaskRay
126 days ago
|
|
Interesting to see that people are still spending much time on assembly languages :)
I've had a lot of fun with it in recent years as well. (Shameless plug: I've written a few on LLVM integrated assembler regarding better fragments and improving expressions and relocations). When comparing GNU Assembler and MASM, GAS is missing many features: while loop, string processing (.e.g strlen) > page 3: "It’s important to understand that MASM converts macro invocation arguments to text values before doing the macro expansion" Like MASM, GAS uses call-by-name evaluation by default. While GAS's altmacro mode does allow for expression evaluation using syntax like `%(1+2)`, it has strict limitations: it only supports absolute expressions and is restricted to argument positions. In contrast, MASM's % operator (page 8) looks far more general. |
|
On Linux, the "standard" assembler for humans is "nasm", though there are also others.
For anyone writing a non-negligible amount of code in an assembly language it is essential to develop or get from elsewhere a comprehensive library of macros, for avoiding to write huge amounts of boilerplate.