From owner-freebsd-hackers Sat Jul 11 11:39:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA00263 for freebsd-hackers-outgoing; Sat, 11 Jul 1998 11:39:28 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA00258 for ; Sat, 11 Jul 1998 11:39:27 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id OAA04241; Sat, 11 Jul 1998 14:38:55 -0400 (EDT) (envelope-from luoqi) Date: Sat, 11 Jul 1998 14:38:55 -0400 (EDT) From: Luoqi Chen Message-Id: <199807111838.OAA04241@lor.watermarkgroup.com> To: hackers@FreeBSD.ORG, jvz@ns.nternet.net Subject: Re: Assembly.. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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