A comment identifies text that the assembler ignores.

ARM syntax

A comment is the final part of a source line. The first semicolon on a line marks the beginning of a comment except where the semicolon appears inside a string literal.
The end of the line is the end of the comment. A comment alone is a valid line.
For example:
; This whole line is a comment
; As is this line

myProc: PROC
    MOV     r1, #16    ; Load R0 with 16

GNU syntax

GNU syntax assembly code provides two different methods for marking comments:
  • The /* and */ markers identify multiline comments:
    /* This is a comment
    that spans multiple
    lines */
  • The // marker identifies the remainder of a line as a comment:
    MOV R0,#16    // Load R0 with 16
Related information
GNU Binutils - Using as: Comments
armasm User Guide: Syntax of source lines in assembly language
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.