5.3 Comments

A comment identifies text that the assembler ignores.

armasm 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
Non-ConfidentialPDF file icon PDF version100068_0609_00_en
Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved.