TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: JAMES VAHN
from: PIETER DE JONG
date: 1997-05-17 20:59:00
subject: Assembler in Linux

Hello James!
16 May 97 17:39, James Vahn wrote to Eric Nadeau:
 >> Is there a list of the kernel's functions?
 JV> Look in /usr/include/asm/unistd.h, which is a link into the kernel 
source.
 JV> There are a few comments but it's a bit of mumbo-jumbo to me at this 
time.
almost all of the systemcalls have direct equivalents in the C library. The 
man-pages or the info-files on glibc (or any programming book on POSIX or 
unix for that matter) will at least explain the behaviour of many of the 
user-accessible kernel routines.
The rest of the code in the include file you mention shows how gcc handles 
the difference between arguments on the stack (libc) and arguments in 
registers (kernel). It pops all arguments off the stack and puts them in the 
registers before calling the interrupt. It then handles the return value. 
There's one function for each type of systemcall: those without args, those 
with one arg, etc.
For the kernel-code itself i would recommend (besides the sources i already 
mentioned) Maurice J. Bach 1986 "The Design of the Unix operating system". 
The basics in the book and linux are the same, and as a bonus has an appendix 
with most  SysVR2 systemcalls.
Bye , Pieter
--- GoldED 2.41+
---------------
* Origin: __Pigs On The Wing__ Leiden, NL. (pjs@xs4all.nl) (2:281/214.7)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.