Date: Sat, 11 Jul 1998 11:38:12 -0400 (EDT) From: zhihuizhang <bf20761@binghamton.edu> To: Jonny <jvz@ns.nternet.net> Cc: hackers@FreeBSD.ORG Subject: Re: Assembly.. Message-ID: <Pine.SOL.L3.93.980711113148.758D-100000@sparky8> In-Reply-To: <Pine.BSF.3.96.980710202155.12666A-100000@ns.nternet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I myself do not fully understand the details of the system call mechanism. But I think the following two sources might be of help: (1) Dr. Dobb's Journal March 1998 - Benchmarking and Software Testing, Tracing BSD System Calls, by Sean Eric Fagan (2) http://www.x86.org/intel.doc/P2Manuals.html, Intel Architecture Software Developer's Manual, Volume 3: System Programming Guide -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- On Sat, 11 Jul 1998, Jonny wrote: > > Hi, im having a bit of a problem understanding the way > freebsd does its syscalls in asm.. ive searched, and > read the as info pages numerous times, and looked over > kernel src, along with compiling simple C code with -S -o blah.s > i was told fbsd uses 'call gates' so that where linux would do > > movl $1,%eax // exit() syscall in linux > movl $0,%ebx // exit code > int $0x80 // do the syscall > > i was told fbsd is similar > only where linux does the interrupt it would do a call ie; > > call 0x7,0x0 > > which gives me errors from as (no known i386 instructions) > > i understand i could do the 'call syscallName' but i want > a thorough understanding on how these ' call gates' work.. > if someone could explain a bit how they work and are called.. > and provide me a sample standalone asm code .. heck 'hello world' > for that matter.. i would greatly appreciate it. > > thanx in advance. > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.980711113148.758D-100000>