Subversion Repositories Kolibri OS

Rev

Rev 4921 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4921 Serge 1
 
2
#include 
3
4
 
5
               size_t offset, size_t count, size_t *reads)
6
{
7
    int  retval;
8
    int  d0;
9
    __asm__ __volatile__(
10
    "pushl $0 \n\t"
11
    "pushl $0 \n\t"
12
    "movl %%eax, 1(%%esp) \n\t"
13
    "pushl %%ebx \n\t"
14
    "pushl %%edx \n\t"
15
    "pushl $0 \n\t"
16
    "pushl %%ecx \n\t"
17
    "pushl $0 \n\t"
18
    "movl %%esp, %%ebx \n\t"
19
    "mov $70, %%eax \n\t"
20
    "int $0x40 \n\t"
21
    "testl %%esi, %%esi \n\t"
22
    "jz 1f \n\t"
23
    "movl %%ebx, (%%esi) \n\t"
24
"1:"
25
    "addl $28, %%esp \n\t"
26
    :"=a" (retval)
27
    :"a"(path),"b"(buff),"c"(offset),"d"(count),"S"(reads));
28
    return retval == 6 ? 0 : retval;
5204 clevermous 29
};
4921 Serge 30