Now I tried to call system call form user app trought interrupt.
User app and kernel are written in C language, but I use asm inline. And I wonder how could I call syscalls trought interrupt directly to some kernel function.
I created mini syscall.h file what system functions can be available, for example:
When user app tries to call function lets say:
Code: Select all
unsigned short WindowNr = SYSCALL_CreateWindow(Window);
Code: Select all
unsigned short SYSCALL_CreateWindow(GUIWindow ThisWindow)
{
__asm__(
"movl 0x1, %eax\n\t"
"int $0x33");
}
So, could you help me? Or I wrote bad inline asm, or maybe after an interrupt is trigered some registers changes or etc.?
And one more question. If user app call a functon that requires some input values and stores these values in stack pointer memory, so after an interrupt these input values should leave in stack, right?
Could you point to some good system calls examples?
Thanks, bye
P.S.: sorry for my bad english.