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_DEBUGS 0x100
50 #define SYS_DEBUGF 0x101
51 #define SYS_DEBUGHEX 0x102
53 #if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
54 static const char *cSYSCALL_NAMES[] = {
58 foreach $call (@calls)
60 while( $lastid + 1 < $call->[0] )
62 print HEADER "\t\"\",\n";
63 $lastid = $lastid + 1;
65 print HEADER "\t\"", $call->[1], "\",\n";
66 $lastid = $lastid + 1;
79 open(ASM, ">include/syscalls.inc.asm");
85 foreach $call (@calls)
87 print ASM "%define ", $call->[1], "\t", $call->[0], "\t ;", $call->[2], "\n";