[net.micro.68k] Assembler vs C

vacca@burdvax.UUCP (04/18/84)

     I am trying to determine the percentage of users (in the following
three environments) who actually use assembler to some degree:

       1. UNIX systems programmers
       2. UNIX applications programmers
       3. students and faculty in a university UNIX environment

The question is whether or not C is a viable alternative to using assembler.
It seems that the SysV manuals are trying to dissuade UNIX programmers from
using assembler.  Is this true?

rej@cornell.UUCP (04/19/84)

C can replace assembler.  The only use for assembler on VAXen is to
write the context switching routines and to improve the speed of a
few commonly used subroutines.  People that I know programming in C
on a 68000 never seem to use assembler.  The Cornell Program Synthesiser
is written in C and runs on many PDP-11s across campus.  Its device
drivers and overlay routines are written in C, with only the process
switching routines being in assembler.

Ralph Johnson  cornell!rej

willc@iuvax.UUCP (04/20/84)

I agree that there is very little need to program in assembly language
under Unix.  In our department, the systems programmers generally use C
and the faculty generally use languages such as Scheme (a dialect of Lisp).

I recently chose to build the kernel of a Scheme processor in Motorola
68000 assembly language rather than in C.  The kernel interprets a p-code,
so the assembly language code amounts to microcode for a hypothetical
machine.  For this application, which involves considerable bit-diddling
on specific hardware registers, I believe assembly language is easier to
work with than C.

Such applications are extremely rare.

				William Clinger
				willc!iuvax...

laman@sdcsvax.UUCP (04/21/84)

Also used in the C library for the system interface routines, but that's
not the kernel...

			Nooooo....  Not ANOTHER set of interface routines.....

			Mike Laman
			UUCP: {ucbvax,philabs,sdccsu3,sdcsla}!sdcsvax!laman

grunwald@uiuccsb.UUCP (04/23/84)

#R:burdvax:-159300:uiuccsb:13700002:000:443
uiuccsb!grunwald    Apr 23 09:47:00 1984

  I fall under (3), and I use a small amount of assembler every once in a while.
I'm working on a version of the Berkley Pascal compiler which allows multiple
processes. There's a small amount of assembler needed to handle context swaps,
and that is essentially used as a co-routine call between C/Pascal programs.
  The only other case is where I hand-code a routine such as "bcopy" to copy
blocks of data using the VAX special instructions.

berry@zinfandel.UUCP (04/26/84)

#R:burdvax:-159300:zinfandel:8000007:000:465
zinfandel!berry    Apr 23 16:15:00 1984

In the four or so years I  have been working with C and UNIX, I have written
2 (count 'em, two) assembler routines.  Both were to wring the most out
of the innermost loop after profiling.  One was in fact, merely a version
of strcmp that didn't save any registers, and used some volatile ones
instead of the ones the C compiler picked.  That got an extra 12% speedup from
a cross-loader.

Berry Kercheval		Zehntel Inc.	(ihnp4!zehntel!zinfandel!berry)
(415)932-6900