| ||||||||
Technical Support On-Line Manuals AARM User's Guide | ExamplesThe following assembler source file shows the usage of C Macros.
#if !defined (__AA__) || (__AA__ < 101)
#error "This source file requires AARM Assembler V1.01 or higher"
#endif
#pragma NOLIST
#include <91M55800.H> // Register file for Atmel AT91M55800
#pragma LIST
#define TEST1 10
#define MYTEXT "Hello World"
AREA MYCODE, CODE
MOV R0,#TEST1 * 10
#if TEST1 == 10
DB MYTEXT
#endif
DB "GENERATED: ", __DATE__
END
The listing file generated by the assembler shows the text replacements performed by the C preprocessor:
LOC OBJ LINE SOURCE
1
.
.
.
2123 $LIST
2124
2125
2126
2127
00000000 2128 AREA MYCODE, CODE
00000000 E3A00064 2129 MOV R0,#10 * 10
2130
2131
00000004 48656C6C 2132 DB "Hello World"
00000008 6F20576F
0000000C 726C64
2133
2134
0000000F 47454E45 2135 DB "GENERATED: ", "Nov 01 2004"
00000013 52415445
00000017 443A204E
0000001B 6F762030
0000001F 31203230
00000023 3034
2136 END
| |||||||
| ||||||||