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