08048714 <main>:
8048714: 55 push %ebp
8048715: 89 e5 mov %esp,%ebp
8048717: 83 e4 f0 and $0xfffffff0,%esp//爲main函數的參數argc、argv保留位置
804871a: 56 push %esi
804871b: 53 push %ebx
804871c: 83 ec 28 sub $0x28,%esp
804871f: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp) //將0x1存到esp寄存器中,即int i=1
8048726: 00
8048727: 8d 44 24 1c lea 0x1c(%esp),%eax// esp寄存器裏的變量i的地址傳給eax
804872b: 89 44 24 18 mov %eax,0x18(%esp)//將寄存器eax中的內容(i的地址)傳給寄存器中的變量ref,即int& ref=i
804872f: 8b 44 24 18 mov 0x18(%esp),%eax//將寄存器esp中的ref傳給eax,即i的地址
8048733: 8b 00 mov (%eax),%eax//以寄存器eax中的值作爲地址,取出值給eax 8048735: 89 44 24 14 mov %eax,0x14(%esp) //將寄存器eax中的值傳給寄存器esp中的x,即x=ref
8048739: c7 44 24 04 00 89 04 movl $0x8048900,0x4(%esp)
8048740: 08
8048741: c7 04 24 40 a0 04 08 movl $0x804a040,(%esp)
8048748: e8 cb fe ff ff call 8048618 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt>
804874d: 8b 54 24 14 mov 0x14(%esp),%edx
8048751: 89 54 24 04 mov %edx,0x4(%esp)
8048755: 89 04 24 mov %eax,(%esp)
8048758: e8 5b fe ff ff call 80485b8 <_ZNSolsEi@plt>
804875d: c7 44 24 04 38 86 04 movl $0x8048638,0x4(%esp)
8048764: 08
8048765: 89 04 24 mov %eax,(%esp)
8048768: e8 bb fe ff ff call 8048628 <_ZNSolsEPFRSoS_E@plt>//從8048739~8048768這些行就是執行"cout<<"x is "<<x<<endl;"
804876d: 8b 44 24 18 mov 0x18(%esp),%eax//將寄存器esp中的ref傳到eax中
8048771: c7 00 02 00 00 00 movl $0x2,(%eax) //將0x2存到eax寄存器中
8048777: 8d 44 24 1c lea 0x1c(%esp),%eax// esp寄存器裏的變量i的地址傳給eax
804877b: 89 44 24 10 mov %eax,0x10(%esp) //將寄存器eax中的內容(即i的地址)傳到寄存器esp中的p
804877f: 8b 5c 24 1c mov 0x1c(%esp),%ebx
8048783: 8b 44 24 18 mov 0x18(%esp),%eax
8048787: 8b 30 mov (%eax),%esi
8048789: c7 44 24 04 06 89 04 movl $0x8048906,0x4(%esp)
8048790: 08
8048791: c7 04 24 40 a0 04 08 movl $0x804a040,(%esp)
8048798: e8 7b fe ff ff call 8048618 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt>
804879d: 89 74 24 04 mov %esi,0x4(%esp)
80487a1: 89 04 24 mov %eax,(%esp)
80487a4: e8 0f fe ff ff call 80485b8 <_ZNSolsEi@plt>
80487a9: c7 44 24 04 0d 89 04 movl $0x804890d,0x4(%esp)
80487b0: 08
80487b1: 89 04 24 mov %eax,(%esp)
80487b4: e8 5f fe ff ff call 8048618 <_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@plt>
80487b9: 89 5c 24 04 mov %ebx,0x4(%esp)
80487bd: 89 04 24 mov %eax,(%esp)
80487c0: e8 f3 fd ff ff call 80485b8 <_ZNSolsEi@plt>
80487c5: c7 44 24 04 38 86 04 movl $0x8048638,0x4(%esp)
80487cc: 08
80487cd: 89 04 24 mov %eax,(%esp)
80487d0: e8 53 fe ff ff call 8048628 <_ZNSolsEPFRSoS_E@plt>//這些行就是執行"cout<<"ref = "<<ref<<", i = "<<i<<endl;"
80487d5: b8 00 00 00 00 mov $0x0,%eax
80487da: 83 c4 28 add $0x28,%esp
80487dd: 5b pop %ebx
80487de: 5e pop %esi
80487df: 89 ec mov %ebp,%esp
80487e1: 5d pop %ebp
80487e2: c3 ret
|