5 open(FILE, "syscalls.lst");
15 elsif(/([A-Z_]+)\s+(.+)/)
17 push @calls, [$num, $1, $2];
25 open(HEADER, ">include/syscalls.h");
31 * NOTE: Generated from Kernel/syscalls.lst
40 foreach my $call (@calls)
42 print HEADER "#define ", $call->[1], "\t", $call->[0], "\t// ", $call->[2], "\n";
46 #define NUM_SYSCALLS ",$i,"
47 #define SYS_DEBUG 0x100
50 static const char *cSYSCALL_NAMES[] = {
54 foreach $call (@calls)
56 while( $lastid + 1 < $call->[0] )
58 print HEADER "\t\"\",\n";
59 $lastid = $lastid + 1;
61 print HEADER "\t\"", $call->[1], "\",\n";
62 $lastid = $lastid + 1;
75 open(ASM, ">include/syscalls.inc.asm");
81 foreach $call (@calls)
83 print ASM "%define ", $call->[1], "\t", $call->[0], "\t ;", $call->[2], "\n";