Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 1998 09:48:09 -0400 (EDT)
From:      Jonny <jvz@ns.nternet.net>
To:        hackers@FreeBSD.ORG
Subject:   Assembly..
Message-ID:  <Pine.BSF.3.96.980710202155.12666A-100000@ns.nternet.net>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980710202155.12666A-100000>