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 if( $lastid + 1 != $call->[0] ) {
45 print HEADER "\t", $call->[1];
46 if( $lastid + 1 != $call->[0] ) {
47 print HEADER " = ", $call->[0];
49 print HEADER ",\t// ", $call->[2], "\n";
57 static const char *cSYSCALL_NAMES[] = {
61 foreach $call (@calls)
63 while( $lastid + 1 < $call->[0] )
65 print HEADER "\t\"\",\n";
66 $lastid = $lastid + 1;
68 print HEADER "\t\"", $call->[1], "\",\n";
69 $lastid = $lastid + 1;
81 open(ASM, ">include/syscalls.inc.asm");
87 foreach $call (@calls)
89 print ASM "%define ", $call->[1], "\t", $call->[0], "\t ;", $call->[2], "\n";