Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. #include <sys/types.h>
  3. #include <sys/kos_io.h>
  4.  
  5. int create_file(const char *path)
  6. {
  7.      int retval;
  8.      __asm__ __volatile__ (
  9.      "pushl $0 \n\t"
  10.      "pushl $0 \n\t"
  11.      "movl %0, 1(%%esp) \n\t"
  12.      "pushl $0 \n\t"
  13.      "pushl $0 \n\t"
  14.      "pushl $0 \n\t"
  15.      "pushl $0 \n\t"
  16.      "pushl $2 \n\t"
  17.      "movl %%esp, %%ebx \n\t"
  18.      "movl $70, %%eax \n\t"
  19.      "int $0x40 \n\t"
  20.      "addl $28, %%esp \n\t"
  21.      :"=a" (retval)
  22.      :"r" (path)
  23.      :"ebx");
  24.   return retval;
  25. };
  26.