Вот код:
int _tmain(int argc, _TCHAR* argv[])
{
unsigned int n;
// loop type 1
for (n=0; n<25; n++)
putc('1',stdout);
// loop type 2
for (n=25; n>0; n--)
putc('2',stdout);
// loop type 2
n=25;
do
{
putc('3',stdout);
}while( --n);
return 0;
}
Вот результат (VS2005):
; 7 : {
push esi
; 8 : unsigned int n;
; 9 :
; 10 : // loop type 1
; 11 : for (n=0; n<25; n++)
mov esi, 25
$LL9@wmain:
; 12 : putc('1',stdout);
call ___iob_func
add eax, 32
push eax
push 49
call _putc
add esp, 8
sub esi, 1
jne SHORT $LL9@wmain
; 13 :
; 14 : // loop type 2
; 15 : for (n=25; n>0; n--)
mov esi, 25
$LL6@wmain:
; 16 : putc('2',stdout);
call ___iob_func
add eax, 32
push eax
push 50
call _putc
add esp, 8
sub esi, 1
jne SHORT $LL6@wmain
; 17 :
; 18 : // loop type 2
; 19 : n=25;
mov esi, 25
$LL3@wmain:
; 20 : do
; 21 : {
; 22 : putc('3',stdout);
call ___iob_func
add eax, 32
push eax
push 51
call _putc
add esp, 8
; 23 : }while( --n);
sub esi, 1
jne SHORT $LL3@wmain
; 24 :
; 25 :
; 26 : return 0;
xor eax, eax
pop esi
; 27 : }
ret 0