I think are the delimiters of the assembler code you insert into C ..... asm("nop") the sharp (#) mean a line comment into assembly language ---------------------------------------- > Date: Fri, 9 Jul 2010 19:52:23 +0800 > Subject: What's the meaning of #APP and #NOAPP > From: mobile.parmenides@xxxxxxxxx > To: gcc-help@xxxxxxxxxxx > > The following C souce file is compiled and produce relevant assembly > language file. > > #include > > int main() > { > int a = 10; > int b = 20; > int result; > result = a * b; > asm ( "nop"); > printf("The result is %d\n", result); > return 0; > } > > .file "asmtest.c" > .section .rodata > .LC0: > .string "The result is %d\n" > .text > .globl main > .type main, @function > main: > pushl %ebp > movl %esp, %ebp > andl $-16, %esp > subl $32, %esp > movl $10, 28(%esp) > movl $20, 24(%esp) > movl 28(%esp), %eax > imull 24(%esp), %eax > movl %eax, 20(%esp) > #APP > # 10 "asmtest.c" 1 > nop > # 0 "" 2 > #NO_APP > movl $.LC0, %eax > movl 20(%esp), %edx > movl %edx, 4(%esp) > movl %eax, (%esp) > call printf > movl $0, %eax > leave > ret > .size main, .-main > .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3" > .section .note.GNU-stack,"",@progbits > > what's the meaning of the following slice of code? > > #APP > # 10 "asmtest.c" 1 > nop > # 0 "" 2 > #NO_APP _________________________________________________________________ Importa i tuoi contatti di Facebook. Chiacchiera su Messenger! http://www.windowslive.it/importaAmici.aspx