add files
[idlebox.git] / write-newline.s
blobd56471b3c5566a595a46db1fc00af66da596817a
1 .include "linux.s"
2 .globl write_newline
3 .type write_newline, @function
4 .section .data
5 newline:
6 .ascii "\n"
7 .section .text
8 .equ ST_FILEDES, 8
9 write_newline:
10 pushl %ebp
11 movl %esp, %ebp
13 movl $SYS_WRITE, %eax
14 movl ST_FILEDES(%ebp), %ebx
15 movl $newline, %ecx
16 movl $1, %edx
17 int $LINUX_SYSCALL
18 movl %ebp, %esp
19 popl %ebp
20 ret