2010-02-12 21:11:35 +01:00
|
|
|
|
|
|
|
int create_file(const char *path)
|
|
|
|
{
|
|
|
|
int retval;
|
2016-10-13 23:18:16 +02:00
|
|
|
int count;
|
2010-02-12 21:11:35 +01:00
|
|
|
__asm__ __volatile__ (
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
2016-10-13 23:18:16 +02:00
|
|
|
"movl %2, 1(%%esp) \n\t"
|
2010-02-12 21:11:35 +01:00
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $0 \n\t"
|
|
|
|
"pushl $2 \n\t"
|
|
|
|
"movl %%esp, %%ebx \n\t"
|
|
|
|
"movl $70, %%eax \n\t"
|
|
|
|
"int $0x40 \n\t"
|
|
|
|
"addl $28, %%esp \n\t"
|
2016-10-13 23:18:16 +02:00
|
|
|
:"=a" (retval), "=b"(count)
|
2010-02-12 21:11:35 +01:00
|
|
|
:"r" (path)
|
2016-10-13 23:18:16 +02:00
|
|
|
);
|
2010-02-12 21:11:35 +01:00
|
|
|
return retval;
|
|
|
|
};
|