diff options
author | midipix <writeonce@midipix.org> | 2015-06-02 18:51:21 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-06-02 18:51:21 -0400 |
commit | d7559106d2d94a78b4c8a718a86c1655931b0429 (patch) | |
tree | 9b66bf6ff760f6730d53a498a99ef56964fea078 /dataimp/dllimp/a.s | |
parent | 5f501ccf6601ce40f0e15e71233c383f54be7845 (diff) | |
download | scrap-d7559106d2d94a78b4c8a718a86c1655931b0429.tar.bz2 scrap-d7559106d2d94a78b4c8a718a86c1655931b0429.tar.xz |
declaring stdout with dllimport
Diffstat (limited to 'dataimp/dllimp/a.s')
-rw-r--r-- | dataimp/dllimp/a.s | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dataimp/dllimp/a.s b/dataimp/dllimp/a.s new file mode 100644 index 0000000..6415afc --- /dev/null +++ b/dataimp/dllimp/a.s @@ -0,0 +1,32 @@ + .file "a.c" + .section .text.startup,"x" + .p2align 4,,15 + .globl main + .def main; .scl 2; .type 32; .endef + .seh_proc main +main: +.LFB0: + .cfi_startproc + .seh_pushreg %rbx + pushq %rbx + .cfi_def_cfa_offset 16 + .cfi_offset 3, -16 + .seh_stackalloc 32 + subq $32, %rsp + .cfi_def_cfa_offset 48 + .seh_endprologue + movq __imp_stdout(%rip), %rax + movl %ecx, %ebx + movq (%rax), %rcx + call fflush + movl %ebx, %eax + addq $32, %rsp + .cfi_def_cfa_offset 16 + popq %rbx + .cfi_def_cfa_offset 8 + .cfi_restore 3 + ret + .cfi_endproc +.LFE0: + .seh_endproc + .def fflush; .scl 2; .type 32; .endef |