[comp.arch] machine specific languages

webber@brandx.rutgers.edu (Webber) (12/17/87)

In article <7535@alice.UUCP>, dmr@alice.UUCP writes:
> djsalomon@watdragon.waterloo.edu, in common with lots of others,
> thinks that C was designed to be optimal on the PDP-11, in particular
> because of the ++ and -- operators.  Actually, this is much less
> so than usually believed.
> ...
> There is in fact rather little that is PDP-11 specific in C.
> Aside from things that are nearly universal these days, it prefers ...

Well, it seems to me that the PDP-11 has had a major influence on subsequent
architectures, so the fact that many things are nearly universal today
does not contradict the notion that they are PDP-11 specific vis a vis
the time when C was designed.

To me, a language is machine specific when it supports exactly the set of
primitive data objects that the machine supports with exactly the same
set of primitive operations.  

(Un)fortunately, I don't have a PDP-11 instruction set handy to go
down the list of which operators in PDP-11 machine code are primitives
in C and which primitives in C correspond to single machine
instructions, as well as which memory types can be directly declared
and which declarations correspond to memory types in the architecture.
Clearly the PDP-11 instruction set wasn't as restrictive as C, but C
does rather nicely mirror the kinds of standard conventions that a
PDP-11 assembly programmer would typically use.

-------- BOB (webber@athos.rutgers.edu ; rutgers!athos.rutgers.edu!webber)

peter@sugar.UUCP (Peter da Silva) (12/22/87)

In article <673@brandx.rutgers.edu>, webber@brandx.rutgers.edu (Webber) writes:
> In article <7535@alice.UUCP>, dmr@alice.UUCP (and he should know) writes:
> > There is in fact rather little that is PDP-11 specific in C.
> > Aside from things that are nearly universal these days, it prefers ...

> To me, a language is machine specific when it supports exactly the set of
> primitive data objects that the machine supports with exactly the same
> set of primitive operations.  

> Clearly the PDP-11 instruction set wasn't as restrictive as C, but C
> does rather nicely mirror the kinds of standard conventions that a
> PDP-11 assembly programmer would typically use.

I used to think the same thing about PL/M and the 8080/8086 (geeze, this
language is clearly designed by people who did a lot of coding on the 8080),
until it was pointed out to me that the same constructs I was looking at
existed in PL/1. The most you could say was that PL/1 might have been chosen
as a model because it fit the 8080 register layout so well.

So perhaps it's more a case of Ritchie getting into the 11 because it fit
his language ideas, rather than the other way around.
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.

richard@islenet.UUCP (Richard Foulk) (12/28/87)

In article <1297@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:
> [...]
> I used to think the same thing about PL/M and the 8080/8086 (geeze, this
> language is clearly designed by people who did a lot of coding on the 8080),
> until it was pointed out to me that the same constructs I was looking at
> existed in PL/1. The most you could say was that PL/1 might have been chosen
> as a model because it fit the 8080 register layout so well.

As I understand it Kildall wrote PL/M with similarities to PL/I because
he was very familiar with PL/I.  (He later wrote a PL/I compiler.)

I think the notion that he did alot of 8080 work prior to the PL/M project
may be incorrect.  Though PL/M does seem to have paid particular attention
to the details of 8080 register usage, etc., most of those details can
be gleaned from one reading of an architectural description of the 8080.

-- 
Richard Foulk		...{dual,vortex,ihnp4}!islenet!richard
Honolulu, Hawaii