1. 程式人生 > >puts()函式和printf函式的區別

puts()函式和printf函式的區別


//==========================
gcc -S hello.c
//======================
cat hello.s
//===========.file "hello.c"
.section .rodata
.LC0:
.string "hello world! addr=0x%08x\n"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $20, %esp
movl $printf, 4(%esp)
movl $.LC0, (%esp)
call printf //=================