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) \

sdiv z,x,y; \

mul z,z,y; \

sub z,z,x

asm void func(void)

{

remainder(r3,r4,r5)

bx lr

}