Avatar billede nicklasw Nybegynder
13. maj 2006 - 22:50 Der er 11 kommentarer og
1 løsning

kan ikke forstå

Hej.
Jeg har et spørgsmål.
lad os sige at vi laver dette meget standart program i c++

#include<iostream>

using namespace std;

int main()
{
cout<<"hello world";
}

okay dette skulle vi alle blive enige om, at det både kan compiles til *nix, mac og windows.
hvis jeg skulle compile dette til linux og windows så vil både source koden og include være det samme. men i den binary fil hvad er forskellen der?

M.V.H Nicklas
Avatar billede arne_v Ekspert
13. maj 2006 - 22:55 #1
hvis det er en anden CPU arkitektur så vil selve instruktionerne
være anderledes

hvis det er en anden compiler vil library kald være anderledes

hvis det er et andet styre system vil image formatet (headere og angivelse
af sektioner) være anderledes
Avatar billede nicklasw Nybegynder
13. maj 2006 - 23:02 #2
okay det var jo hurtigt!
hvad er det der står i library filen. trode bare at binary filen kaldte nogen standart komandor fx. at printe et eller andet ud på skærmen
Avatar billede arne_v Ekspert
13. maj 2006 - 23:15 #3
calling convention kan være forskellig mellem forskellige compilere

der kan også være kode som bliver oversat til funktions kald der ikke
er standardiseret

og når man begynder at kigge på indholdet af librariet så vil selv standard kald jo kalde
nogle helt forskellige funktioner på forskellige styre systemer
Avatar billede nicklasw Nybegynder
13. maj 2006 - 23:20 #4
okay tak for svaret.
bare læg et svar.
Avatar billede arne_v Ekspert
13. maj 2006 - 23:23 #5
Har du prøvet at eksperimentere lidt med at få compileren til at vise
den genererede assembler kode ?
Avatar billede arne_v Ekspert
13. maj 2006 - 23:24 #6
C++ kode:

#include<iostream>

using namespace std;

int main()
{
    cout << "hello world" << endl;
    return 0;
}
Avatar billede arne_v Ekspert
13. maj 2006 - 23:24 #7
kode genereret af g++:

    .file    "z.cpp"
.lcomm __ZSt8__ioinit,16
    .def    ___main;    .scl    2;    .type    32;    .endef
    .text
LC0:
    .ascii "hello world\0"
    .align 2
.globl _main
    .def    _main;    .scl    2;    .type    32;    .endef
_main:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    andl    $-16, %esp
    movl    $0, %eax
    movl    %eax, -4(%ebp)
    movl    -4(%ebp), %eax
    call    __alloca
    call    ___main
    subl    $8, %esp
    pushl    $__ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
    subl    $12, %esp
    pushl    $LC0
    pushl    $__ZSt4cout
    call    __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
    addl    $20, %esp
    pushl    %eax
    call    __ZNSolsEPFRSoS_E
    addl    $16, %esp
    movl    $0, %eax
    leave
    ret
    .align 2
    .def    __Z41__static_initialization_and_destruction_0ii;    .scl    3;    .type    32;    .endef
__Z41__static_initialization_and_destruction_0ii:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    cmpl    $65535, 12(%ebp)
    jne    L3
    cmpl    $1, 8(%ebp)
    jne    L3
    subl    $12, %esp
    pushl    $__ZSt8__ioinit
    call    __ZNSt8ios_base4InitC1Ev
    addl    $16, %esp
L3:
    cmpl    $65535, 12(%ebp)
    jne    L2
    cmpl    $0, 8(%ebp)
    jne    L2
    subl    $12, %esp
    pushl    $__ZSt8__ioinit
    call    __ZNSt8ios_base4InitD1Ev
    addl    $16, %esp
L2:
    leave
    ret
    .align 2
    .def    __GLOBAL__I_main;    .scl    3;    .type    32;    .endef
__GLOBAL__I_main:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    subl    $8, %esp
    pushl    $65535
    pushl    $1
    call    __Z41__static_initialization_and_destruction_0ii
    addl    $16, %esp
    leave
    ret
    .section    .ctors,"w"
    .align 4
    .long    __GLOBAL__I_main
    .text
    .align 2
    .def    __GLOBAL__D_main;    .scl    3;    .type    32;    .endef
__GLOBAL__D_main:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    subl    $8, %esp
    pushl    $65535
    pushl    $0
    call    __Z41__static_initialization_and_destruction_0ii
    addl    $16, %esp
    leave
    ret
    .section    .dtors,"w"
    .align 4
    .long    __GLOBAL__D_main
    .def    __ZNSt8ios_base4InitD1Ev;    .scl    3;    .type    32;    .endef
    .def    __ZNSt8ios_base4InitC1Ev;    .scl    3;    .type    32;    .endef
    .def    __ZNSolsEPFRSoS_E;    .scl    3;    .type    32;    .endef
    .def    __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_;    .scl    3;    .type    32;    .endef
    .def    __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc;    .scl    3;    .type    32;    .endef
Avatar billede arne_v Ekspert
13. maj 2006 - 23:25 #8
kode genereret af BCB:

    .386p
    ifdef ??version
    if ??version GT 500H
    .mmx
    endif
    endif
    model flat
    ifndef    ??version
    ?debug    macro
    endm
    endif
    ?debug    S "z.cpp"
    ?debug    T "z.cpp"
_TEXT    segment dword public use32 'CODE'
_TEXT    ends
_DATA    segment dword public use32 'DATA'
_DATA    ends
_BSS    segment dword public use32 'BSS'
_BSS    ends
DGROUP    group    _BSS,_DATA
_TEXT    segment dword public use32 'CODE'
_main    segment virtual
@_main    proc    near
?live16385@0:
;   
;    int main()
;   
    push ebp
    mov ebp,esp
;   
;    {
;        cout << "hello world" << endl;
;   
@1:
    push offset s@
    push offset @_STL@cout
    call @@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc
    add esp,8
    push offset @_STL@cout
    call @@_STL@%endl$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$r44_STL@%basic_ostream$c20_STL@%char_traits$c%%
    pop ecx
;   
;        return 0;
;   
    xor eax,eax
;   
;    }
;   
@3:
@2:
    pop ebp
    ret
@_main    endp
_main    ends
_TEXT    ends
_DATA    segment dword public use32 'DATA'
@_$CHZLB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    segment virtual
    align    2
@@_$CHZLB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    label    dword
    dd    0
    dd    0
    dd    @4
    dd    0
    dd    0
    dd    0
    dd    0
    dd    0
@_$CHZLB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    ends
_DATA    ends
_DATA    segment dword public use32 'DATA'
@_$DCAMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    segment virtual
    align    2
@@_$DCAMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    label    dword
    dd    @@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry
    dd    4
    dd    -8
    dd    0
    dd    @@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry
    dd    4
    dd    -8
    dd    0
@_$DCAMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    ends
_DATA    ends
_DATA    segment dword public use32 'DATA'
@_$ECTBMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    segment virtual
    align    2
@@_$ECTBMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    label    dword
    dd    0
    dd    -44
    dw    0
    dw    5
    dd    0
    dd    @@_$DCAMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc+16
    dw    8
    dw    5
    dd    0
    dd    0
    dw    0
    dw    5
    dd    0
    dd    @@_$DCAMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc
    dw    32
    dw    3
    dd    @@_$CHZLB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc
    dw    32
    dw    4
    dw    32
    dw    5
    dd    0
    dd    0
@_$ECTBMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    ends
_DATA    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    segment virtual
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    proc    near
?live16387@0:
    push ebp
    mov ebp,esp
    add esp,-76
    push ebx
    push esi
    push edi
    mov edi,dword ptr [ebp+12]
@5:
    mov eax,offset @@_$ECTBMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc
    call @__InitExceptBlockLDTC
?live16387@16: ; EDI = __s
    mov word ptr [ebp-28],8
    mov ebx,dword ptr [ebp+8]
    mov dword ptr [ebp-8],ebx
    push ebx
    call @@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o
    pop ecx
    mov byte ptr [ebp-4],al
    inc dword ptr [ebp-16]
    mov word ptr [ebp-28],32
    cmp byte ptr [ebp-4],0
    je        @7
@8:
    mov byte ptr [ebp-45],1
    mov ebx,edi
    push ebx
    call @_strlen
    pop ecx
    mov ebx,eax
?live16387@80: ; EBX = __n, EDI = __s
    mov eax,dword ptr [ebp+8]
    mov edx,dword ptr [eax]
    cmp ebx,dword ptr [edx+28]
    jge      short @9
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov esi,dword ptr [eax+28]
    sub esi,ebx
    jmp short @10
@9:
    xor esi,esi
?live16387@96: ; EBX = __n, ESI = __npad, EDI = __s
@10:
    mov word ptr [ebp-28],44
    test esi,esi
    jne      short @11
?live16387@128: ; EBX = __n, EDI = __s
    mov esi,ebx
    mov dword ptr [ebp-52],edi
    push esi
    push dword ptr [ebp-52]
    mov eax,dword ptr [ebp+8]
    mov edx,dword ptr [eax]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+40]
    add esp,12
    cmp ebx,eax
    setne dl
    and edx,1
    mov byte ptr [ebp-45],dl
    jmp @12
?live16387@144: ; EBX = __n, ESI = __npad, EDI = __s
@11:
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov edx,dword ptr [eax+4]
    and edx,7
    dec edx
    jne      short @13
    mov dword ptr [ebp-56],ebx
    mov dword ptr [ebp-60],edi
    push dword ptr [ebp-56]
    push dword ptr [ebp-60]
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov edx,dword ptr [eax+108]
    push edx
    mov ecx,dword ptr [edx]
    call dword ptr [ecx+40]
    add esp,12
    cmp ebx,eax
    setne al
    and eax,1
    mov byte ptr [ebp-45],al
?live16387@176: ; ESI = __npad
    cmp byte ptr [ebp-45],0
    jne      short @14
    mov edi,esi
    mov edx,dword ptr [ebp+8]
    mov ecx,dword ptr [edx]
    mov bl,byte ptr [ecx+104]
    push edi
    push ebx
    mov eax,dword ptr [ebp+8]
    mov edx,dword ptr [eax]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+44]
    add esp,12
    cmp esi,eax
    jne      short @14
    xor edx,edx
    jmp short @15
@14:
    mov edx,1
@15:
    mov byte ptr [ebp-45],dl
?live16387@192: ;
    jmp short @12
?live16387@208: ; EBX = __n, ESI = __npad, EDI = __s
@13:
    mov dword ptr [ebp-64],esi
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov dl,byte ptr [eax+104]
    mov byte ptr [ebp-65],dl
    push dword ptr [ebp-64]
    mov cl,byte ptr [ebp-65]
    push ecx
    mov eax,dword ptr [ebp+8]
    mov edx,dword ptr [eax]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+44]
    add esp,12
    cmp esi,eax
    setne dl
    and edx,1
    mov byte ptr [ebp-45],dl
?live16387@224: ; EBX = __n, EDI = __s
    cmp byte ptr [ebp-45],0
    jne      short @16
    mov esi,ebx
    mov dword ptr [ebp-72],edi
    push esi
    push dword ptr [ebp-72]
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov edx,dword ptr [eax+108]
    push edx
    mov ecx,dword ptr [edx]
    call dword ptr [ecx+40]
    add esp,12
    cmp ebx,eax
    jne      short @16
    xor eax,eax
    jmp short @17
@16:
    mov eax,1
@17:
    mov byte ptr [ebp-45],al
?live16387@240: ;
@12:
    mov edx,dword ptr [ebp+8]
    mov eax,dword ptr [edx]
    mov edx,dword ptr [eax+28]
    xor ecx,ecx
    mov dword ptr [eax+28],ecx
    mov word ptr [ebp-28],32
    jmp short @18
@19:
@4:
    push 1
    mov eax,dword ptr [ebp+8]
    push dword ptr [eax]
    call @@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi
    add esp,8
@20:
    mov word ptr [ebp-28],52
    call @@_CatchCleanup$qv
@18:
    cmp byte ptr [ebp-45],0
    je        short @21
    mov edx,dword ptr [ebp+8]
    mov eax,dword ptr [edx]
    mov edx,dword ptr [eax+8]
    or edx,4
    cmp dword ptr [eax+108],0
    je        short @22
    mov ecx,edx
    jmp short @23
@22:
    mov ecx,edx
    or ecx,1
@23:
    mov edx,ecx
    mov dword ptr [eax+8],edx
    mov edx,dword ptr [eax+8]
    and edx,dword ptr [eax+20]
    je        short @24
    push eax
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@24:
@25:
@21:
@26:
@7:
    dec dword ptr [ebp-16]
    mov eax,dword ptr [ebp-8]
    mov eax,dword ptr [eax]
    test byte ptr [eax+5],32
    je        short @27
    mov esi,dword ptr [ebp-8]
    mov edx,dword ptr [esi]
    cmp dword ptr [edx+108],0
    je        short @28
    mov ecx,dword ptr [esi]
    mov eax,dword ptr [ecx+108]
    push eax
    mov edx,dword ptr [eax]
    call dword ptr [edx+16]
    pop ecx
    inc eax
    jne      short @28
    mov ebx,dword ptr [esi]
    mov edi,dword ptr [ebx+8]
    or edi,1
    cmp dword ptr [ebx+108],0
    je        short @33
    mov eax,edi
    jmp short @34
@33:
    mov eax,edi
    or eax,1
@34:
    mov dword ptr [ebp-76],eax
    mov edx,dword ptr [ebp-76]
    mov dword ptr [ebx+8],edx
    mov ecx,dword ptr [ebx+8]
    and ecx,dword ptr [ebx+20]
    je        short @28
    push ebx
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@27:
@28:
    mov word ptr [ebp-28],32
    mov eax,dword ptr [ebp-44]
    mov dword ptr fs:[0],eax
@37:
    pop edi
    pop esi
    pop ebx
    mov esp,ebp
    pop ebp
    ret
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    endp
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@_M_put_nowiden$qpxc    ends
_TEXT    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o    segment virtual
@@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o    proc    near
?live16392@0:
    push ebp
    mov ebp,esp
    add esp,-8
    push ebx
    push esi
    push edi
    mov ebx,dword ptr [ebp+8]
?live16392@16: ; EBX = __str
@38:
    mov eax,dword ptr [ebx]
    cmp dword ptr [eax+8],0
    sete dl
    and edx,1
    test dl,dl
    je        @39
    mov ecx,dword ptr [ebx]
    cmp dword ptr [ecx+108],0
    jne      short @40
    mov eax,dword ptr [ebx]
    mov edx,dword ptr [eax+8]
    or edx,1
    cmp dword ptr [eax+108],0
    je        short @41
    mov ecx,edx
    jmp short @42
@41:
    mov ecx,edx
    or ecx,1
@42:
    mov edx,ecx
    mov dword ptr [eax+8],edx
    mov edx,dword ptr [eax+8]
    and edx,dword ptr [eax+20]
    je        short @43
    push eax
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@43:
@44:
@40:
    mov eax,dword ptr [ebx]
    cmp dword ptr [eax+112],0
    je        short @45
    mov eax,dword ptr [ebx]
    mov esi,dword ptr [eax+112]
    mov eax,dword ptr [esi]
    cmp dword ptr [eax+108],0
    je        short @46
    mov edx,dword ptr [esi]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+16]
    pop ecx
    inc eax
    jne      short @47
    mov edi,dword ptr [esi]
    mov edx,dword ptr [edi+8]
    or edx,1
    mov dword ptr [ebp-4],edx
    cmp dword ptr [edi+108],0
    je        short @50
    mov ecx,dword ptr [ebp-4]
    jmp short @51
@50:
    mov ecx,dword ptr [ebp-4]
    or ecx,1
@51:
    mov dword ptr [ebp-8],ecx
    mov eax,dword ptr [ebp-8]
    mov dword ptr [edi+8],eax
    mov edx,dword ptr [edi+8]
    and edx,dword ptr [edi+20]
    je        short @47
    push edi
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@46:
@47:
@45:
    mov eax,dword ptr [ebx]
    cmp dword ptr [eax+8],0
    sete al
    and eax,1
    jmp short @54
?live16392@112: ;
@39:
    xor eax,eax
@56:
@54:
    pop edi
    pop esi
    pop ebx
    pop ecx
    pop ecx
    pop ebp
    ret
@@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o    endp
@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o    ends
_TEXT    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi    segment virtual
@@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi    proc    near
?live16393@0:
    push ebp
    mov ebp,esp
    mov edx,dword ptr [ebp+12]
    mov eax,dword ptr [ebp+8]
?live16393@16: ; EAX = this, EDX = __flag
@57:
    mov ecx,edx
    or dword ptr [eax+8],ecx
    test dword ptr [eax+20],edx
    je        short @58
?live16393@48: ;
    push 0
    push 0
    call @_ReThrowException$quipuc
    add esp,8
@58:
@59:
    pop ebp
    ret
@@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi    endp
@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi    ends
_TEXT    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%endl$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$r44_STL@%basic_ostream$c20_STL@%char_traits$c%%    segment virtual
@@_STL@%endl$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$r44_STL@%basic_ostream$c20_STL@%char_traits$c%%    proc    near
?live16386@0:
    push ebp
    mov ebp,esp
    push ecx
    push ebx
    push esi
    push edi
    mov ebx,dword ptr [ebp+8]
?live16386@16: ; EBX = __os
@60:
    push 10
    push ebx
    call @@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc
    add esp,8
    mov eax,dword ptr [ebx]
    cmp dword ptr [eax+108],0
    je        short @61
    mov edx,dword ptr [ebx]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+16]
    pop ecx
    inc eax
    jne      short @62
    mov esi,dword ptr [ebx]
    mov edi,dword ptr [esi+8]
    or edi,1
    cmp dword ptr [esi+108],0
    je        short @65
    mov eax,edi
    jmp short @66
@65:
    mov eax,edi
    or eax,1
@66:
    mov dword ptr [ebp-4],eax
    mov edx,dword ptr [ebp-4]
    mov dword ptr [esi+8],edx
    mov ecx,dword ptr [esi+8]
    and ecx,dword ptr [esi+20]
    je        short @62
    push esi
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@61:
@62:
    mov eax,ebx
?live16386@64: ;
@70:
@69:
    pop edi
    pop esi
    pop ebx
    pop ecx
    pop ebp
    ret
@@_STL@%endl$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$r44_STL@%basic_ostream$c20_STL@%char_traits$c%%    endp
@_STL@%endl$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$r44_STL@%basic_ostream$c20_STL@%char_traits$c%%    ends
_TEXT    ends
_DATA    segment dword public use32 'DATA'
@_$CHCMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    segment virtual
    align    2
@@_$CHCMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    label    dword
    dd    0
    dd    0
    dd    @71
    dd    0
    dd    0
    dd    0
    dd    0
    dd    0
@_$CHCMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    ends
_DATA    ends
_DATA    segment dword public use32 'DATA'
@_$DCDMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    segment virtual
    align    2
@@_$DCDMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    label    dword
    dd    @@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry
    dd    4
    dd    -8
    dd    0
    dd    @@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry
    dd    4
    dd    -8
    dd    0
@_$DCDMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    ends
_DATA    ends
_DATA    segment dword public use32 'DATA'
@_$ECTEMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    segment virtual
    align    2
@@_$ECTEMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    label    dword
    dd    0
    dd    -44
    dw    0
    dw    5
    dd    0
    dd    @@_$DCDMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc+16
    dw    8
    dw    5
    dd    0
    dd    0
    dw    0
    dw    5
    dd    0
    dd    @@_$DCDMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc
    dw    32
    dw    3
    dd    @@_$CHCMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc
    dw    32
    dw    4
    dw    32
    dw    5
    dd    0
    dd    0
@_$ECTEMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    ends
_DATA    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    segment virtual
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    proc    near
?live16394@0:
    push ebp
    mov ebp,esp
    add esp,-64
    push ebx
    push esi
    push edi
@72:
    mov eax,offset @@_$ECTEMB$@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc
    call @__InitExceptBlockLDTC
    mov word ptr [ebp-28],8
    mov ebx,dword ptr [ebp+8]
    mov dword ptr [ebp-8],ebx
    push ebx
    call @@_STL@%_M_init$c20_STL@%char_traits$c%%$qr44_STL@%basic_ostream$c20_STL@%char_traits$c%%$o
    pop ecx
    mov byte ptr [ebp-4],al
    inc dword ptr [ebp-16]
    mov word ptr [ebp-28],32
    mov byte ptr [ebp-45],1
    cmp byte ptr [ebp-4],0
    je        @74
    mov word ptr [ebp-28],44
    mov al,byte ptr [ebp+12]
    mov byte ptr [ebp-46],al
    mov edx,dword ptr [ebp+8]
    mov ecx,dword ptr [edx]
    mov ebx,dword ptr [ecx+108]
    mov eax,dword ptr [ebx+8]
    mov dword ptr [ebp-52],eax
    mov edx,dword ptr [ebp-52]
    cmp dword ptr [edx+8],0
    jle      short @75
    mov esi,dword ptr [ebx+8]
    dec dword ptr [esi+8]
    mov ecx,dword ptr [esi]
    inc dword ptr [esi]
    mov al,byte ptr [ebp-46]
    mov byte ptr [ecx],al
    movzx edi,byte ptr [ebp-46]
    jmp short @76
@75:
    xor eax,eax
    mov al,byte ptr [ebp-46]
    push eax
    push ebx
    mov edx,dword ptr [ebx]
    call dword ptr [edx+48]
    add esp,8
    mov edi,eax
@76:
    mov dword ptr [ebp-56],edi
    mov dword ptr [ebp-60],-1
    mov ecx,dword ptr [ebp-56]
    cmp ecx,dword ptr [ebp-60]
    sete al
    and eax,1
    mov byte ptr [ebp-45],al
    mov word ptr [ebp-28],32
    jmp short @77
@78:
@71:
    push 1
    mov edx,dword ptr [ebp+8]
    push dword ptr [edx]
    call @@_STL@%basic_ios$c20_STL@%char_traits$c%%@_M_handle_exception$qi
    add esp,8
@79:
    mov word ptr [ebp-28],52
    call @@_CatchCleanup$qv
@77:
@74:
    cmp byte ptr [ebp-45],0
    je        short @80
    mov ecx,dword ptr [ebp+8]
    mov eax,dword ptr [ecx]
    mov edx,dword ptr [eax+8]
    or edx,1
    cmp dword ptr [eax+108],0
    je        short @81
    mov ecx,edx
    jmp short @82
@81:
    mov ecx,edx
    or ecx,1
@82:
    mov edx,ecx
    mov dword ptr [eax+8],edx
    mov edx,dword ptr [eax+8]
    and edx,dword ptr [eax+20]
    je        short @83
    push eax
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@83:
@84:
@80:
    mov eax,dword ptr [ebp+8]
    push eax
    dec dword ptr [ebp-16]
    mov eax,dword ptr [ebp-8]
    mov edx,dword ptr [eax]
    test byte ptr [edx+5],32
    je        short @85
    mov esi,dword ptr [ebp-8]
    mov ecx,dword ptr [esi]
    cmp dword ptr [ecx+108],0
    je        short @86
    mov eax,dword ptr [esi]
    mov edx,dword ptr [eax+108]
    push edx
    mov ecx,dword ptr [edx]
    call dword ptr [ecx+16]
    pop ecx
    inc eax
    jne      short @86
    mov ebx,dword ptr [esi]
    mov edi,dword ptr [ebx+8]
    or edi,1
    cmp dword ptr [ebx+108],0
    je        short @91
    mov eax,edi
    jmp short @92
@91:
    mov eax,edi
    or eax,1
@92:
    mov dword ptr [ebp-64],eax
    mov edx,dword ptr [ebp-64]
    mov dword ptr [ebx+8],edx
    mov ecx,dword ptr [ebx+8]
    and ecx,dword ptr [ebx+20]
    je        short @86
    push ebx
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@85:
@86:
    mov word ptr [ebp-28],32
    pop eax
    mov edx,dword ptr [ebp-44]
    mov dword ptr fs:[0],edx
@96:
@95:
    pop edi
    pop esi
    pop ebx
    mov esp,ebp
    pop ebp
    ret
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    endp
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@put$qc    ends
_TEXT    ends
_TEXT    segment dword public use32 'CODE'
@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry    segment virtual
    align    2
@@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry    label    byte
    dd    8
    dw    3
    dw    48
    dd    -1
    dd    3
    dw    108
    dw    112
    dd    0
    dw    0
    dw    0
    dd    0
    dd    1
    dd    1
    dd    @@_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry@$bdtr$qv
    dw    1
    dw    116
    db    95
    db    83
    db    84
    db    76
    db    58
    db    58
    db    98
    db    97
    db    115
    db    105
    db    99
    db    95
    db    111
    db    115
    db    116
    db    114
    db    101
    db    97
    db    109
    db    60
    db    99
    db    104
    db    97
    db    114
    db    44
    db    95
    db    83
    db    84
    db    76
    db    58
    db    58
    db    99
    db    104
    db    97
    db    114
    db    95
    db    116
    db    114
    db    97
    db    105
    db    116
    db    115
    db    60
    db    99
    db    104
    db    97
    db    114
    db    62
    db    32
    db    62
    db    58
    db    58
    db    115
    db    101
    db    110
    db    116
    db    114
    db    121
    db    0
    db    0
    dd    0
    dd    0
    dd    0
@$xt$51_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry    ends
_TEXT    ends
_TEXT    segment dword public use32 'CODE'
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry@$bdtr$qv    segment virtual
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry@$bdtr$qv    proc    near
?live16398@0:
    push ebp
    mov ebp,esp
    add esp,-8
    push ebx
    push esi
    push edi
    mov ebx,dword ptr [ebp+8]
@97:
    test ebx,ebx
    je        short @98
?live16398@16: ; EBX = this
    mov eax,dword ptr [ebx]
    mov edx,dword ptr [eax]
    test byte ptr [edx+5],32
    je        short @99
    mov esi,dword ptr [ebx]
    mov eax,dword ptr [esi]
    cmp dword ptr [eax+108],0
    je        short @100
    mov edx,dword ptr [esi]
    mov ecx,dword ptr [edx+108]
    push ecx
    mov eax,dword ptr [ecx]
    call dword ptr [eax+16]
    pop ecx
    inc eax
    jne      short @101
    mov edi,dword ptr [esi]
    mov edx,dword ptr [edi+8]
    or edx,1
    mov dword ptr [ebp-4],edx
    cmp dword ptr [edi+108],0
    je        short @104
    mov ecx,dword ptr [ebp-4]
    jmp short @105
@104:
    mov ecx,dword ptr [ebp-4]
    or ecx,1
@105:
    mov dword ptr [ebp-8],ecx
    mov eax,dword ptr [ebp-8]
    mov dword ptr [edi+8],eax
    mov edx,dword ptr [edi+8]
    and edx,dword ptr [edi+20]
    je        short @101
    push edi
    call @@_STL@ios_base@_M_throw_failure$qv
    pop ecx
@100:
@101:
@99:
    test byte ptr [ebp+12],1
    je        short @108
    push ebx
    call @$bdele$qpv
    pop ecx
?live16398@48: ;
@108:
@98:
@109:
    pop edi
    pop esi
    pop ebx
    pop ecx
    pop ecx
    pop ebp
    ret
@@_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry@$bdtr$qv    endp
@_STL@%basic_ostream$c20_STL@%char_traits$c%%@sentry@$bdtr$qv    ends
_TEXT    ends
_DATA    segment dword public use32 'DATA'
s@    label    byte
    ;    s@+0:
    db    "hello world",0
    align    4
_DATA    ends
_TEXT    segment dword public use32 'CODE'
_TEXT    ends
extrn __Exception_list:dword
extrn @_STL@cout:byte
@_strlen equ _strlen
extrn _strlen:near
@@_CatchCleanup$qv equ @_CatchCleanup$qv
extrn @_CatchCleanup$qv:near
@@_STL@ios_base@_M_throw_failure$qv equ @_STL@ios_base@_M_throw_failure$qv
extrn @_STL@ios_base@_M_throw_failure$qv:near
extrn @__InitExceptBlockLDTC:near
extrn @_ReThrowException$quipuc:near
extrn @$bdele$qpv:near
?debug C 9F73746C702E6C6962
    ?debug    D "C:\Borland\CBuilderX\include\stl/_config_compat_post.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\config/_epilog.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_epilog.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_num_get.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_num_get.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_istream.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_istreambuf_iterator.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_limits.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\float.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cfloat.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_limits.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_num_put.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_num_put.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ostream.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ostreambuf_iterator.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ostream.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_streambuf.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_nfile.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stdio.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cstdio.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_stdio_file.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_streambuf.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ios.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_numpunct.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/c_locale.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ctype.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_locale.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\utility" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\utility.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_hash_fun.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string_hash.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string_io.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string_io.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_range_errors.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string_fwd.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ctraits_fns.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_function_base.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_function.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\mbctype.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\ctype.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cctype.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_auto_ptr.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_raw_storage_iter.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_tempbuf.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_iterator.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_algobase.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_pair.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_algobase.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_uninitialized.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_lim.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\climits.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_tempbuf.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\memory" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\memory.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport/string" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\string.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_iterator_base.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_construct.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_threads.c" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_threads.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\alloc.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\oldstl/new.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\new" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\new.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_alloc.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\iosfwd" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\iosfwd.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_string_fwd.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\errno.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\search.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stdlib.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cstdlib.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\except.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\rw/stdwind.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\rw/stddefs.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\compnent.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stdcomp.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\oldstl/exceptio.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\exception" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\exceptio.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\stdexcept" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stdexcep.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ios_base.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_ios.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_istream.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/type_traits.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cstring.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_mbstate.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\mem.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_loc.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\locale.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_str.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\oldstl/string.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\tchar.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\wchar.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\oldstl/cwchar.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_cwchar.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\cwchar" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cwchar.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_null.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_defs.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\_stddef.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stddef.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\cstddef.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/char_traits.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_iosfwd.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\config/_prolog.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\config/stl_confix.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\config/stl_bc.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\config/stlcomp.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_site_config.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_config_compat.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl_user_config.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_config.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stl/_prolog.h" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\stlport\iostream" 12059 38912
    ?debug    D "C:\Borland\CBuilderX\include\iostream.h" 12059 38912
    ?debug    D "z.cpp" 13485 35546
    end
Avatar billede nicklasw Nybegynder
13. maj 2006 - 23:30 #9
hvordan får du dem til at vise det?
Avatar billede arne_v Ekspert
13. maj 2006 - 23:35 #10
og g++ på Linux (de 2 andre er på Windows):

    .file    "z.cpp"
    .text
    .align 2
    .type    _ZSt17__verify_groupingPKcjRKSs, @function
_ZSt17__verify_groupingPKcjRKSs:
.LFB1361:
    pushl    %ebp
.LCFI0:
    movl    %esp, %ebp
.LCFI1:
    subl    $40, %esp
.LCFI2:
    subl    $12, %esp
    pushl    16(%ebp)
.LCFI3:
    call    _ZNKSs4sizeEv
    addl    $16, %esp
    decl    %eax
    movl    %eax, -4(%ebp)
    subl    $8, %esp
    movl    12(%ebp), %eax
    decl    %eax
    movl    %eax, -12(%ebp)
    leal    -12(%ebp), %eax
    pushl    %eax
    leal    -4(%ebp), %eax
    pushl    %eax
    call    _ZSt3minIjERKT_S2_S2_
    addl    $16, %esp
    movl    (%eax), %eax
    movl    %eax, -8(%ebp)
    movl    -4(%ebp), %eax
    movl    %eax, -16(%ebp)
    movb    $1, -17(%ebp)
    movl    $0, -24(%ebp)
.L2:
    movl    -24(%ebp), %eax
    cmpl    -8(%ebp), %eax
    jae    .L5
    cmpb    $0, -17(%ebp)
    je    .L5
    subl    $8, %esp
    pushl    -16(%ebp)
    pushl    16(%ebp)
    call    _ZNKSsixEj
    addl    $16, %esp
    movl    %eax, %ecx
    movl    -24(%ebp), %eax
    movl    8(%ebp), %edx
    addl    %eax, %edx
    movb    (%ecx), %al
    cmpb    (%edx), %al
    sete    %al
    movb    %al, -17(%ebp)
    leal    -16(%ebp), %eax
    decl    (%eax)
    leal    -24(%ebp), %eax
    incl    (%eax)
    jmp    .L2
.L5:
    cmpl    $0, -16(%ebp)
    je    .L6
    cmpb    $0, -17(%ebp)
    je    .L6
    subl    $8, %esp
    pushl    -16(%ebp)
    pushl    16(%ebp)
    call    _ZNKSsixEj
    addl    $16, %esp
    movl    %eax, %ecx
    movl    -8(%ebp), %eax
    movl    8(%ebp), %edx
    addl    %eax, %edx
    movb    (%ecx), %al
    cmpb    (%edx), %al
    sete    %al
    movb    %al, -17(%ebp)
    leal    -16(%ebp), %eax
    decl    (%eax)
    jmp    .L5
.L6:
    subl    $8, %esp
    pushl    $0
    pushl    16(%ebp)
    call    _ZNKSsixEj
    addl    $16, %esp
    movl    %eax, %ecx
    movl    -8(%ebp), %eax
    movl    8(%ebp), %edx
    addl    %eax, %edx
    movb    (%ecx), %al
    cmpb    (%edx), %al
    jg    .L8
    movzbl    -17(%ebp), %eax
    andl    $1, %eax
    movb    %al, -25(%ebp)
    jmp    .L9
.L8:
    movb    $0, -25(%ebp)
.L9:
    movb    -25(%ebp), %al
    movb    %al, -17(%ebp)
    movzbl    -17(%ebp), %eax
    leave
    ret
.LFE1361:
    .size    _ZSt17__verify_groupingPKcjRKSs, .-_ZSt17__verify_groupingPKcjRKSs
    .local    _ZSt8__ioinit
    .comm    _ZSt8__ioinit,1,1
    .section    .rodata
.LC0:
    .string    "hello world"
    .text
    .align 2
.globl main
    .type    main, @function
main:
.LFB1442:
    pushl    %ebp
.LCFI4:
    movl    %esp, %ebp
.LCFI5:
    subl    $8, %esp
.LCFI6:
    andl    $-16, %esp
    movl    $0, %eax
    addl    $15, %eax
    addl    $15, %eax
    shrl    $4, %eax
    sall    $4, %eax
    subl    %eax, %esp
    subl    $8, %esp
    pushl    $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
    subl    $12, %esp
    pushl    $.LC0
    pushl    $_ZSt4cout
.LCFI7:
    call    _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
    addl    $20, %esp
    pushl    %eax
.LCFI8:
    call    _ZNSolsEPFRSoS_E
    addl    $16, %esp
    movl    $0, %eax
    leave
    ret
.LFE1442:
    .size    main, .-main
    .section    .gnu.linkonce.t._ZSt3minIjERKT_S2_S2_,"ax",@progbits
    .align 2
    .weak    _ZSt3minIjERKT_S2_S2_
    .type    _ZSt3minIjERKT_S2_S2_, @function
_ZSt3minIjERKT_S2_S2_:
.LFB1443:
    pushl    %ebp
.LCFI9:
    movl    %esp, %ebp
.LCFI10:
    subl    $4, %esp
.LCFI11:
    movl    12(%ebp), %eax
    movl    8(%ebp), %edx
    movl    (%eax), %eax
    cmpl    (%edx), %eax
    jae    .L12
    movl    12(%ebp), %eax
    movl    %eax, -4(%ebp)
    jmp    .L11
.L12:
    movl    8(%ebp), %eax
    movl    %eax, -4(%ebp)
.L11:
    movl    -4(%ebp), %eax
    leave
    ret
.LFE1443:
    .size    _ZSt3minIjERKT_S2_S2_, .-_ZSt3minIjERKT_S2_S2_
    .text
    .align 2
    .type    _Z41__static_initialization_and_destruction_0ii, @function
_Z41__static_initialization_and_destruction_0ii:
.LFB1450:
    pushl    %ebp
.LCFI12:
    movl    %esp, %ebp
.LCFI13:
    subl    $8, %esp
.LCFI14:
    cmpl    $65535, 12(%ebp)
    jne    .L13
    cmpl    $1, 8(%ebp)
    jne    .L13
    subl    $12, %esp
    pushl    $_ZSt8__ioinit
.LCFI15:
    call    _ZNSt8ios_base4InitC1Ev
    addl    $16, %esp
    subl    $4, %esp
    pushl    $__dso_handle
    pushl    $0
    pushl    $__tcf_0
    call    __cxa_atexit
    addl    $16, %esp
.L13:
    leave
    ret
.LFE1450:
    .size    _Z41__static_initialization_and_destruction_0ii, .-_Z41__static_initialization_and_destruction_0ii
    .align 2
    .type    __tcf_0, @function
__tcf_0:
.LFB1451:
    pushl    %ebp
.LCFI16:
    movl    %esp, %ebp
.LCFI17:
    subl    $8, %esp
.LCFI18:
    subl    $12, %esp
    pushl    $_ZSt8__ioinit
.LCFI19:
    call    _ZNSt8ios_base4InitD1Ev
    addl    $16, %esp
    leave
    ret
.LFE1451:
    .size    __tcf_0, .-__tcf_0
    .align 2
    .type    _GLOBAL__I_main, @function
_GLOBAL__I_main:
.LFB1452:
    pushl    %ebp
.LCFI20:
    movl    %esp, %ebp
.LCFI21:
    subl    $8, %esp
.LCFI22:
    subl    $8, %esp
    pushl    $65535
    pushl    $1
.LCFI23:
    call    _Z41__static_initialization_and_destruction_0ii
    addl    $16, %esp
    leave
    ret
.LFE1452:
    .size    _GLOBAL__I_main, .-_GLOBAL__I_main
    .section    .ctors,"aw",@progbits
    .align 4
    .long    _GLOBAL__I_main
    .weak    pthread_mutex_unlock
    .weak    pthread_mutex_trylock
    .weak    pthread_mutex_lock
    .weak    pthread_create
    .weak    pthread_setspecific
    .weak    pthread_getspecific
    .weak    pthread_key_delete
    .weak    pthread_key_create
    .weak    pthread_once
    .section    .eh_frame,"a",@progbits
.Lframe1:
    .long    .LECIE1-.LSCIE1
.LSCIE1:
    .long    0x0
    .byte    0x1
    .string    "zP"
    .uleb128 0x1
    .sleb128 -4
    .byte    0x8
    .uleb128 0x5
    .byte    0x0
    .long    __gxx_personality_v0
    .byte    0xc
    .uleb128 0x4
    .uleb128 0x4
    .byte    0x88
    .uleb128 0x1
    .align 4
.LECIE1:
.LSFDE1:
    .long    .LEFDE1-.LASFDE1
.LASFDE1:
    .long    .LASFDE1-.Lframe1
    .long    .LFB1361
    .long    .LFE1361-.LFB1361
    .uleb128 0x0
    .byte    0x4
    .long    .LCFI0-.LFB1361
    .byte    0xe
    .uleb128 0x8
    .byte    0x85
    .uleb128 0x2
    .byte    0x4
    .long    .LCFI1-.LCFI0
    .byte    0xd
    .uleb128 0x5
    .byte    0x4
    .long    .LCFI3-.LCFI1
    .byte    0x2e
    .uleb128 0x10
    .align 4
.LEFDE1:
.LSFDE3:
    .long    .LEFDE3-.LASFDE3
.LASFDE3:
    .long    .LASFDE3-.Lframe1
    .long    .LFB1442
    .long    .LFE1442-.LFB1442
    .uleb128 0x0
    .byte    0x4
    .long    .LCFI4-.LFB1442
    .byte    0xe
    .uleb128 0x8
    .byte    0x85
    .uleb128 0x2
    .byte    0x4
    .long    .LCFI5-.LCFI4
    .byte    0xd
    .uleb128 0x5
    .byte    0x4
    .long    .LCFI7-.LCFI5
    .byte    0x2e
    .uleb128 0x14
    .byte    0x4
    .long    .LCFI8-.LCFI7
    .byte    0x2e
    .uleb128 0x10
    .align 4
.LEFDE3:
.LSFDE7:
    .long    .LEFDE7-.LASFDE7
.LASFDE7:
    .long    .LASFDE7-.Lframe1
    .long    .LFB1450
    .long    .LFE1450-.LFB1450
    .uleb128 0x0
    .byte    0x4
    .long    .LCFI12-.LFB1450
    .byte    0xe
    .uleb128 0x8
    .byte    0x85
    .uleb128 0x2
    .byte    0x4
    .long    .LCFI13-.LCFI12
    .byte    0xd
    .uleb128 0x5
    .byte    0x4
    .long    .LCFI15-.LCFI13
    .byte    0x2e
    .uleb128 0x10
    .align 4
.LEFDE7:
.LSFDE9:
    .long    .LEFDE9-.LASFDE9
.LASFDE9:
    .long    .LASFDE9-.Lframe1
    .long    .LFB1451
    .long    .LFE1451-.LFB1451
    .uleb128 0x0
    .byte    0x4
    .long    .LCFI16-.LFB1451
    .byte    0xe
    .uleb128 0x8
    .byte    0x85
    .uleb128 0x2
    .byte    0x4
    .long    .LCFI17-.LCFI16
    .byte    0xd
    .uleb128 0x5
    .byte    0x4
    .long    .LCFI19-.LCFI17
    .byte    0x2e
    .uleb128 0x10
    .align 4
.LEFDE9:
.LSFDE11:
    .long    .LEFDE11-.LASFDE11
.LASFDE11:
    .long    .LASFDE11-.Lframe1
    .long    .LFB1452
    .long    .LFE1452-.LFB1452
    .uleb128 0x0
    .byte    0x4
    .long    .LCFI20-.LFB1452
    .byte    0xe
    .uleb128 0x8
    .byte    0x85
    .uleb128 0x2
    .byte    0x4
    .long    .LCFI21-.LCFI20
    .byte    0xd
    .uleb128 0x5
    .byte    0x4
    .long    .LCFI23-.LCFI21
    .byte    0x2e
    .uleb128 0x10
    .align 4
.LEFDE11:
    .section    .note.GNU-stack,"",@progbits
    .ident    "GCC: (GNU) 3.4.4 20050721 (Red Hat 3.4.4-2)"
Avatar billede arne_v Ekspert
13. maj 2006 - 23:37 #11
der er en compiler switch til det

for både g++ og BCB er den -S, men det kan variere mellem compilere

(der er måske også compilere som slet ikke understøtter muligheden)
Avatar billede arne_v Ekspert
13. maj 2006 - 23:37 #12
og et svar
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester