5 open(FILE, "syscalls.lst");
15 elsif(/([A-Z_]+)\s+(.+)/)
17 push @calls, [$num, $1, $2];
25 open(HEADER, ">include/syscalls.h");
28 * - By John Hodge (thePowersGang)
33 * NOTE: Generated from Kernel/syscalls.lst
42 foreach my $call (@calls)
44 print HEADER "#define ", $call->[1], "\t", $call->[0], "\t// ", $call->[2], "\n";
48 #define NUM_SYSCALLS ",$i,"
49 #define SYS_DEBUG 0x100
51 #if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
52 static const char *cSYSCALL_NAMES[] = {
56 foreach $call (@calls)
58 while( $lastid + 1 < $call->[0] )
60 print HEADER "\t\"\",\n";
61 $lastid = $lastid + 1;
63 print HEADER "\t\"", $call->[1], "\",\n";
64 $lastid = $lastid + 1;
77 open(ASM, ">include/syscalls.inc.asm");
83 foreach $call (@calls)
85 print ASM "%define ", $call->[1], "\t", $call->[0], "\t ;", $call->[2], "\n";