freebsd asm

José Nicolás Castellano jncastellano at noconname.org
Mon Jun 14 17:12:10 GMT 2004


----- Original Message ----- 
> ... which doesn't exit, therefore your program accesses memory addresses
> that aren't meant to supply program code, and it crashes.
> 
> Freebsd system calls are generally accessed using interrupt vector 0x80.
> The function that deals with this interrupt in the kernel expects the
> number of the system call in eax, and it expects the program to have
> called a function along the way.  Thus, it's looking for the following
> stack structure:
> 
>     [RRRR][DDDD][SSSS][NNNN]
> 
> RRRR: return address, inserted by 'call' instruction
> DDDD: descriptor vector
> SSSS: string address
> NNNN: number of bytes to write.
>
> ...
> 
> You can find the necessary system call numbers in
> /usr/include/sys/syscall.h .

Tnaks a lot! i understand all perfectly ;-)



More information about the freebsd-hackers mailing list