Keil Logo

Side-Effects

The integrated C preprocessor in the Ax51 Assembler has two side-effects which may cause problems when you assemble programs that were originally written for other assemblers.

  • A backslash character ('\') at the end of a comment line forces the next line to be a comment, too. For example:
    ; THIS IS A COMMENT ENDING WITH \ 
    MOV A,#0
    ; DUE TO THE \ IN THE FIRST LINE THE SECOND LINE IS CONCATENATED
    ; AND THE MOV INSTRUCTION IS NOT ASSEMBLED
    
  • If you use the $INCLUDE directive in conditional assembly blocks, the include file must exist even if the conditional block is not assembled. For example:
    $IF 0
    $INCLUDE (MYFILE.INC)    ; This file must exist even if the block
                             ; is not assembled since the C preprocessor
    $ENDIF                   ; interprets the file first.
    
    #if 0                    // If you use C preprocessor statements
    #include (myfile.inc)    // with the #include directive, the file
    #endif                   // does not need to exist.
    
  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.