Keil Logo



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
; And also 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_0616_01_en
Copyright © 2014–2021 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.