6

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)?

Ankush
  • 851

1 Answers1

2

The default assembler syntax of different platforms simply used different ways of commenting and to make existing code compile without extra modifications, the typical syntax has been adopted by GNU AS, too. Keep in mind that there is no standardization among assembler languages.

Mecki
  • 2,390
  • 1
  • 16
  • 20