TOP10


10:


, . ? , , ESP, , "" ESP .

. Microsoft Visual C++ ( /Ox).

 

main()

{

int a,b=0;

for (a=0;a<10;a++) b+=a*2;

printf("%x\n",b);

}

 

:

 

.text:00000000 _main proc near

.text:00000000 xor ecx, ecx

.text:00000002 xor eax, eax

.text:00000004

.text:00000004 loc_4: ; CODE XREF: _main+Cvj

.text:00000004 add ecx, eax

.text:00000006 add eax, 2

.text:00000009 cmp eax, 14h

.text:0000000C jl short loc_4

.text:0000000E push ecx

.text:0000000F push offset $SG398

.text:00000014 call _printf

.text:00000019 add esp, 8

.text:0000001C retn

.text:0000001C _main endp

 3  ( )

, ! : __asm {mov a,eax } , !

 

.text:00000000 _main proc near