3 ms·
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'
by MaskRay 2mo 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.
- adrian_b 2mo agoThe GNU assembler is not intended to be used by humans, but its goal is to assemble the output of compilers. 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.
- pjmlp 2mo agoThat is true of all UNIX assemblers, they never had the "used by humans" culture, rather being part of a C compiler pipeline approach. At least since UNIX v4. All good Assemblers have come from Amiga, Atari, PC world.