y=++x*++x;程序是这么运行的
程序代码:
程序代码:

; Line 6 mov eax, DWORD PTR _x$[ebp] add eax, 1 mov DWORD PTR _x$[ebp], eax mov ecx, DWORD PTR _x$[ebp] add ecx, 1 mov DWORD PTR _x$[ebp], ecx mov edx, DWORD PTR _x$[ebp] imul edx, DWORD PTR _x$[ebp] mov DWORD PTR _y$[ebp], edx注释

; Line 6 ++x // 此时x = 6 mov eax, DWORD PTR _x$[ebp] // eax = x add eax, 1 // eax = eax+1 mov DWORD PTR _x$[ebp], eax // x = eax ++x // 此时x = 7 mov ecx, DWORD PTR _x$[ebp] // ecx = x add ecx, 1 // ecx = ecx+1 mov DWORD PTR _x$[ebp], ecx // x = ecx y = x*x // Y = 49 mov edx, DWORD PTR _x$[ebp] // edx = x imul edx, DWORD PTR _x$[ebp] // edx = edx*x mov DWORD PTR _y$[ebp], edx // y = edx

世界很简单 是非很复杂
有些东西是你的 但是你质疑的多了 可能就不是你的了