Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 1998 14:38:55 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        hackers@FreeBSD.ORG, jvz@ns.nternet.net
Subject:   Re:  Assembly..
Message-ID:  <199807111838.OAA04241@lor.watermarkgroup.com>

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

It should be a `far' call: lcall 0x7,0x0.

-lq

> 
> 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?199807111838.OAA04241>