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
50 #define SYS_DEBUGHEX 0x101
52 #if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
53 static const char *cSYSCALL_NAMES[] = {
57 foreach $call (@calls)
59 while( $lastid + 1 < $call->[0] )
61 print HEADER "\t\"\",\n";
62 $lastid = $lastid + 1;
64 print HEADER "\t\"", $call->[1], "\",\n";
65 $lastid = $lastid + 1;
78 open(ASM, ">include/syscalls.inc.asm");
84 foreach $call (@calls)
86 print ASM "%define ", $call->[1], "\t", $call->[0], "\t ;", $call->[2], "\n";