2 KERNEL SYSTEM CALL INTERFACE:
3 The kernel system calls are all done through interrupt 0x80
4 All parameters are passed in the 'AX,BX,CX,DX,DI,SI' registers.
5 The AX register contains the system call number.
6 The BX,CX,DX,DI,SI registers contain the first 5 arguments from the stack.
7 (NB If the syscall is know to have less than 5 args the rest are not loaded)
8 On return from the syscall AX has the return value.
9 If AX is -ve then errno= -AX and return val = -1;
11 The system calls are named in syscall/syscall.dat.
12 There is a script syscall/mksyscall which generates the assembler for the
13 system calls, near the top there is a line:
17 the code generated will be slightly faster and larger.
21 KERNEL SIGNAL INTERFACE:
22 It is assumed the kernel will never pass a signal to the userspace
23 routine unless it's _explicitly_ asked for!
25 The Kernel need only save space for _one_ function pointer
26 (to system_signal) and must deal with SIG_DFL and SIG_IGN
29 When a signal is required the kernel must set all the registers as if
30 returning from a interrupt normally then push the number of the signal
31 to be generated, push the current pc value, then set the pc to the
32 address of the 'system_signal' function.
34 This is in syscall/signal.c