*BSD News Article 23104


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!convex!convex!cs.utexas.edu!uunet!spool.mu.edu!bloom-beacon.mit.edu!mcrcim.mcgill.edu!homer.cs.mcgill.ca!storm
From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER)
Newsgroups: comp.os.386bsd.questions
Subject: Re: [NetBSD] What is this in SYS.h?
Date: 1 Nov 1993 03:21:15 GMT
Organization: SOCS, McGill University, Montreal, Canada
Lines: 33
Message-ID: <2b1vbc$3t7@homer.cs.mcgill.ca>
References: <2avo6k$mlm@homer.cs.mcgill.ca> <4177@bigfoot.first.gmd.de>
NNTP-Posting-Host: mnementh.cs.mcgill.ca
X-ORIGINAL-NEWSGROUPS: comp.os.386bsd.questions,comp.os.386bsd.development

In article <4177@bigfoot.first.gmd.de>,
Andreas Schulz <ats@g386bsd.first.gmd.de> wrote:
>An expanded call for this would look:
>2: jmp cerror;
>open:					# Label for system call
>	lea SYS_open,%eax		# put the number for the system call
>					# into the eax register
>	.byte	0x9a			# trap into the kernel
>	.long	0			# these are arguments to the
>	.word	7			# trap.
>
>
>I am not sure, if the 0x9a is a trap or a gate-call , for this you
>must look into a 386 CPU description. I don't know, where mine is,
>i try to prevent assembly programming on this type of CPU :-).



	It turns out that the 0x9a is the CALL instruction INTO
	a more privileged mode in a different segment.

	Discovered that by looking through the Intel i386 book one
	instruction at a time :-)



						Toodlepip!
						Marc 'em.
-- 
-----------------------------------------------------------------------------
Marc Wandschneider					    Seattle, WA
Barney the Dinosaur sings! You faint... Barney sings!  Barney sings! --More--
You Die... --More--