Advertisement
tmcopeland

C++ Cout in ASM

Mar 5th, 2012
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "cc-simple-print.cc"
  2. .lcomm __ZStL8__ioinit,1,1
  3.     .def    ___main;    .scl    2;  .type   32; .endef
  4.     .section .rdata,"dr"
  5. LC0:
  6.     .ascii "Hello, World!\0"
  7.     .text
  8.     .globl  _main
  9.     .def    _main;  .scl    2;  .type   32; .endef
  10. _main:
  11. LFB947:
  12.     .cfi_startproc
  13.     pushl   %ebp
  14.     .cfi_def_cfa_offset 8
  15.     .cfi_offset 5, -8
  16.     movl    %esp, %ebp
  17.     .cfi_def_cfa_register 5
  18.     andl    $-16, %esp
  19.     subl    $16, %esp
  20.     call    ___main
  21.     movl    $LC0, 4(%esp)
  22.     movl    $__ZSt4cout, (%esp)
  23.     call    __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
  24.     movl    $__ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, 4(%esp)
  25.     movl    %eax, (%esp)
  26.     call    __ZNSolsEPFRSoS_E
  27.     movl    $0, %eax
  28.     leave
  29.     .cfi_restore 5
  30.     .cfi_def_cfa 4, 4
  31.     ret
  32.     .cfi_endproc
  33. LFE947:
  34.     .def    ___tcf_0;   .scl    3;  .type   32; .endef
  35. ___tcf_0:
  36. LFB957:
  37.     .cfi_startproc
  38.     pushl   %ebp
  39.     .cfi_def_cfa_offset 8
  40.     .cfi_offset 5, -8
  41.     movl    %esp, %ebp
  42.     .cfi_def_cfa_register 5
  43.     subl    $24, %esp
  44.     movl    $__ZStL8__ioinit, (%esp)
  45.     call    __ZNSt8ios_base4InitD1Ev
  46.     leave
  47.     .cfi_restore 5
  48.     .cfi_def_cfa 4, 4
  49.     ret
  50.     .cfi_endproc
  51. LFE957:
  52.     .def    __Z41__static_initialization_and_destruction_0ii;   .scl    3;  .type   32; .endef
  53. __Z41__static_initialization_and_destruction_0ii:
  54. LFB956:
  55.     .cfi_startproc
  56.     pushl   %ebp
  57.     .cfi_def_cfa_offset 8
  58.     .cfi_offset 5, -8
  59.     movl    %esp, %ebp
  60.     .cfi_def_cfa_register 5
  61.     subl    $24, %esp
  62.     cmpl    $1, 8(%ebp)
  63.     jne L3
  64.     cmpl    $65535, 12(%ebp)
  65.     jne L3
  66.     movl    $__ZStL8__ioinit, (%esp)
  67.     call    __ZNSt8ios_base4InitC1Ev
  68.     movl    $___tcf_0, (%esp)
  69.     call    _atexit
  70. L3:
  71.     leave
  72.     .cfi_restore 5
  73.     .cfi_def_cfa 4, 4
  74.     ret
  75.     .cfi_endproc
  76. LFE956:
  77.     .def    __GLOBAL__sub_I_main;   .scl    3;  .type   32; .endef
  78. __GLOBAL__sub_I_main:
  79. LFB958:
  80.     .cfi_startproc
  81.     pushl   %ebp
  82.     .cfi_def_cfa_offset 8
  83.     .cfi_offset 5, -8
  84.     movl    %esp, %ebp
  85.     .cfi_def_cfa_register 5
  86.     subl    $24, %esp
  87.     movl    $65535, 4(%esp)
  88.     movl    $1, (%esp)
  89.     call    __Z41__static_initialization_and_destruction_0ii
  90.     leave
  91.     .cfi_restore 5
  92.     .cfi_def_cfa 4, 4
  93.     ret
  94.     .cfi_endproc
  95. LFE958:
  96.     .section    .ctors,"w"
  97.     .align 4
  98.     .long   __GLOBAL__sub_I_main
  99.     .def    __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_;    .scl    2;  .type   32; .endef
  100.     .def    __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc;   .scl    2;  .type   32; .endef
  101.     .def    __ZNSolsEPFRSoS_E;  .scl    2;  .type   32; .endef
  102.     .def    __ZNSt8ios_base4InitD1Ev;   .scl    2;  .type   32; .endef
  103.     .def    __ZNSt8ios_base4InitC1Ev;   .scl    2;  .type   32; .endef
  104.     .def    _atexit;    .scl    2;  .type   32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement