Using the Preprocessor

You can use all preprocessor features, such as comments and macros, in the assembler. In multi-line macros, you must end each assembly statement with a semicolon ( ; ) because the ( \ ) operator removes newlines. For example:

  #define remainder(x,y,z) \ 
  divw z,x,y; \ 
  mullw z,z,y; \ 
  subf z,z,x
   
  asm void newPointlessMath(void) 
  { 
    remainder(r3,r4,r5) 
    blr 
  }