【分享】函数的返回值
[(1) 用return操作符返回值(eax)或在(当大于32位时edx和eax) int Add(int x,int y);main( ){ int a=5,b=6; Add(a,b); return 0; } Add(int x,int y){ return(x+y);} 00401000/$6A 06 push 600401002|.6A 05 push 500401004|.E8 07000000 call 用return.00401010 00401010/$8B4424 08 mov eax,dword ptr ss:00401014|.8B4C24 04 mov ecx,dword ptr ss:00401018|.03C1 add eax,ecx0040101A\.C3 retn 00401009|.83C4 08 add esp,80040100C|.33C0 xor eax,eax0040100E\.C3 retn]前面的序号(1)是什么意思?只列举了第(1)种方法? 还有内存传值呀
页:
[1]