The GNU Assembler as
uses different characters depending on the architecture to specify single-line comments, such as #
on x86, ;
on 29k, or @
on ARM. Moreover, regardless of platform, C-style comments are also supported (/* */
).
Is there a technical reason for different comment styles on different architecture? The multi-line comment suggest no, as it works on any platform - however if there is no technical limitation on the characters that can be used for comments, why design the assembler to require different comment styles on different platforms (for single-line comments)?
;
for ARM, not@
.#
was part of the AT&T syntax which the gnu assembler wanted to be compatible with for x86?as
on the PDP-11 used;
for comments (in addition to/
at the start of a line). You can see this in the UNIX V7 source code and in the originalcc
compiler written by dmr.as
manual - it has 1998 as its last update date. Section 8.3 does indeed specify;
as the line comment character for ARM, but I think (from the error messages I'm getting) thatas
-on-ARM uses a different character for that now.