summaryrefslogtreecommitdiff
path: root/dataimp/autoimp/a.s
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-06-02 16:18:24 -0400
committermidipix <writeonce@midipix.org>2015-06-02 16:18:24 -0400
commit5f501ccf6601ce40f0e15e71233c383f54be7845 (patch)
tree614f245209f79227a62fc0db5c2fdce82b1530e0 /dataimp/autoimp/a.s
parent9e8ef584e36f10214d24cb26f77a15f009afa85c (diff)
downloadscrap-5f501ccf6601ce40f0e15e71233c383f54be7845.tar.bz2
scrap-5f501ccf6601ce40f0e15e71233c383f54be7845.tar.xz
an alternative, not using the libc import library (libc.lib.a)
Diffstat (limited to 'dataimp/autoimp/a.s')
-rw-r--r--dataimp/autoimp/a.s31
1 files changed, 31 insertions, 0 deletions
diff --git a/dataimp/autoimp/a.s b/dataimp/autoimp/a.s
new file mode 100644
index 0000000..b83280b
--- /dev/null
+++ b/dataimp/autoimp/a.s
@@ -0,0 +1,31 @@
+ .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
+ movl %ecx, %ebx
+ movq stdout(%rip), %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