#ifndef _UNISTD_H #define _UNISTD_H #define __SYS_puts 0 #define __SYS_time 1 #define _syscall0(type, name) \ type name(void) { \ type __res; \ __asm__ volatile ( \ "int $0x80" \ : "=a" (__res) \ : "a" (__SYS_##name) \ :); \ return __res; \ } #define _syscall1(type, name, atype, a) \ type name(atype a) { \ type __res; \ __asm__ volatile ( \ "int $0x80" \ : "=a" (__res) \ : "a" (__SYS_##name), "b" (a) \ :); \ return __res; \ } #endif