Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!ut-sally!husc6!think!ames!oliveb!sun!gorodish!guy
From: guy%gorodish@Sun.COM (Guy Harris)
Newsgroups: comp.lang.c
Subject: Re: Inline assembler; a quiz  (long; sorry)
Message-ID: <22887@sun.uucp>
Date: Wed, 8-Jul-87 08:14:42 EDT
Article-I.D.: sun.22887
Posted: Wed Jul  8 08:14:42 1987
Date-Received: Sat, 11-Jul-87 03:35:46 EDT
References: <608@zen.UUCP> <2299@hoptoad.uucp> <21211@sun.uucp> <830@omepd> <4793@columbia.UUCP>
Sender: news@sun.uucp
Lines: 30

> The point I'm trying to make is that on Unix the programmer doesn't
> have to worry about the assembler "glue" thats being used.  Not only
> can a programmer use a system call in the same manner as a function
> call,

And the point that many others have been making is that this is in NO
WAY unique to UNIX; other OSes do the same thing.  Even if the OS
doesn't provide assembler wrappers for system calls as part of its
standard library (or if the C compiler doesn't do so), these wrappers
can be written *without* recourse to "asm".  The original posting
seemed to imply that UNIX was somehow unique in that you could get
away without "asm", but that C implementations on other OSes
couldn't; this isn't true in general, because the same techniques
used on UNIX can be used on those other OSes.

> but can even get an understanding of what the system call is
> doing (what tables is it modifying etc.) because the guts of it
> are also written in 'C'.

Well, first of all, you can't do that if you don't have source, and
many - probably most - UNIX sites don't have source.  Second, I
wouldn't go so far as to say that *any* programmer could get an
understanding of what the system call is doing just by looking at the
source code; some stuff in the system is very complex and subtle, and
won't be obvious without a LOT of study.  Third of all, UNIX is NOT
the only OS not entirely written in assembler.  And fourth, this has
nothing to do with what the original discussion was about, anyway.
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com