When creating an assembly l isting, the Compiler writes any comments in the assembler include file. When the Compiler encounters comments within a typedef, structure, or variable declaration, the Compiler places the comments either before or after the declaration in the generated file. The Compiler never places comments inside the declaration, even when the declaration contains multiple lines. Therefore, a comment after a structure field within a typedef appears before or after the whole typedef, not just after the structure field. Every comment is on a single line. An empty comment (/* */) inserts an empty line into the created file. Refer the following listing for an example of using constants.
#pragma CREATE_ASM_LISTING ON /* The function main is called by the startup code. The function is written in C. Its purpose is to initialize the application. */ void main(void); /* The SIZEOF_INT macro specified the size of an integer type in the compiler. */ typedef int SIZEOF_INT; #pragma CREATE_ASM_LISTING OFF
The following listing shows the listing above when disassembled.
; The function main is called by the startup code. ; The function is written in C. Its purpose is ; to initialize the application. XREF main ; ; The SIZEOF_INT macro specified the size of an integer type ; in the compiler. SIZEOF_INT_SIZE EQU $2