add files
[idlebox.git] / write.s
blobd1c2d580e7826c23913b4802f69d69ae35591f6a
1 .include "linux.s"
2 .include "record-def.s"
4 .equ ST_WRITE_BUFFER, 8
5 .equ ST_FILEDES, 12
7 .section .text
8 .globl write_record
9 .type write_record, @function
10 write_record:
11 pushl %ebp
12 movl %esp, %ebp
14 pushl %ebx
15 movl $SYS_WRITE, %eax
16 movl ST_FILEDES(%ebp), %ebx
17 movl ST_WRITE_BUFFER(%ebp), %ecx
18 movl $RECORD_SIZE, %edx
19 int $LINUX_SYSCALL
21 popl %ebx
22 movl %ebp, %esp
23 popl %ebp
24 ret