13

Many programming languages predating C, like FORTRAN, LISP, B, BCPL, were either special purpose or too heavy to write OS. OS were bound to their hardware architecture and died with them. C was used to re-write Unix and made it possible to port it across any platform with a C compiler, and finally outlive its home platform.

But was there any other language/OS pair that predates C, which was functional enough to be "daily-driver", i.e. not experimental, half-baked or virtualised while used in production?

3
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Chenmunka
    Jan 4 at 10:19
  • Can't answer what was the first language, but Lisp is neither too special purpose, nor too heavy. The operating systems of MIT, LMI, and Symbolics Lisp Machines were written in Lisp. Jan 5 at 14:27
  • BCPL was not too heavy, it made C (even back then) look like Python nowadays :-) And I'm not sure why you think it could have been special purpose. It was used for the Amiga OS and we used it for a message passing OS on 6809-based computers (developed on a 3B2 UNIX box).
    – paxdiablo
    Feb 22 at 10:10

4 Answers 4

26

A good candidate might be PL/I (Programming Language One). An Algol based language developed by IBM in 1964, mainly for use with their new /360 mainframes. While full PL/I was quite feature rich, some of its dialects allowed to restrict or removed features to allow more direct code control and removal of runtime utilities.

PL/I and its dialects have been used for several operating systems, either in full or part:

Plus, I guess, many more. It might not have been the first, but for sure quite widely used and rather influential. In some way it came a bit too early.


*1 - As an interesting side note, CP/CMS of the late 1960s was, against company policy, not written in PL/S but Assembler. The decision was made as CP/CMS was intended to stay an (open) source distribution. At that time IBM kept PL/S a 'trade secret', to avoid distribution. While PL/S source code was still handed to (selected) customers, the compiler was never published. In some way the use of PL/S might be considered the start of closed source as common form of software distribution.

17
  • 9
    BLISS, while not the first, deserves an honorable mention. I recall an interview with Ritchie, in which he said that if DEC had let him have a copy of the BLISS compiler for the PDP-11, he probably wouldn't have needed to invent C. (This might be exaggeration; BLISS would have been difficult to self-host on a small -11). I think DEC's reluctance was "we don't want to support it" rather than regarding it as secret. Jan 2 at 15:13
  • 1
    @another-dave It would still be about 5 years too late to be first -- Ritchie didn't start writing Unix until AT&T left the Multics project.
    – Barmar
    Jan 3 at 15:40
  • 1
    @davidbak - Re compiler size: the original BLISS-11 never ran on the PDP-11. I forget whether there was a BLISS-16 compiler running on the -11; as far as I recall, we ran it on VMS along with the rest of our system build. Jan 3 at 18:29
  • 1
    @Barmar - BLISS was about the same level of language as C, though with more control over explicit packing of sub-word fields in structures. [Apparently davidbak and I disagree. I don't regard the consistent treatment of names - resulting in explicit dereferencing - as making it lower-level] Jan 3 at 18:32
  • 2
    As the saying goes, "BLISS is ignorance". Jan 3 at 19:40
10

In 1985, Commodore was rushing to get the Amiga to market so it could compete with the just-released Atari 520ST. As a way to accelerate the software development, Commodore hired Bristol-based MetaComCo to make a port of their OS (known as TRIPOS) to the Amiga. TRIPOS, which had already been ported to the Motorola 68000, was written in BCPL (see source code).

This BCPL code became the AmigaDOS portion of Amiga OS, and remained so for years, until gradually converted to a "C" code base later on. So, clearly, BCPL was used to make a portable DOS, with the Amiga version being one of the (best known) ports. And it was the "daily driver" for millions of Amiga users for a decade.

6
  • 5
    Since Multics was written in PL/I in the 60's, something from the 80's hardly bears mention, IMHO (unless the question were specific to microcomputer operating systems).
    – Barmar
    Jan 3 at 15:39
  • 2
    @Barmar True but fruitless. Answers like this hit a certain nerve of the community. Amiga users are on a crusade to preach the greatness of their system, untouched by time and reality, back then and today. :-) In all seriousness, Apple fanbois are only a cheap ripoff. We love them the way they are. Hard to imagine (retro)computing without - nor would I want to miss them :)
    – Raffzahn
    Jan 3 at 17:29
  • 1
    However the comments to the question suggest BCPL is nearer an answer as it was used 15 years before AmigaDOS for writing and OS
    – mmmmmm
    Jan 3 at 19:24
  • 2
    I'm not familiar with that term, so I don't know what it implies. But it seems like the OP is too young to understand what technology was like in the 60's, and asked the question from his millenial perspective.
    – Barmar
    Jan 3 at 20:45
  • 1
    @Barmar You may be right. If my answer makes any of the history seem more relatable to anyone, I consider that a plus. History should be accurate and relatable.
    – Brian H
    Jan 3 at 20:48
4

It's worth pointing out that the original high-level programming language for the Primos operating system (and its tools, I believe) was FORTRAN. Yes! Really! Naturally there was assembler involved as well, but much of the O/S was written in FORTRAN.

Later on code was added using the PL/P variant of PL/1. For later tools/utilities, the SPL language - another PL/1 variant, very similar to PL/P but with library dependencies which prevented its use in the kernel - was used. Modula-2 was also used a little, I believe.

Primos had architectural "challenges" which meant that C was a difficult fit, though there were C compilers available for later releases. These challenges included a segmented memory architecture where addresses naturally wrapped at segment boundarys, 16-bit native I/O, null pointers which weren't all zeroes and so much more! I believe writing the C compiler(s) was quite a task, which IIRC was out-sourced. To the best of my knowledge, C was never used as a systems programming language internally to Prime.

(I worked for Prime for a while in the 1980s)

3
  • 2
    Addresses wrapped at segment boundaries! Yikes! NULL != 0!! Yikes again!
    – davidbak
    Jan 4 at 16:18
  • The segment boundary thing, I think, was claimed as an advantage for creating circular buffers. All zeroes was a valid memory address and there was a special value for a null pointer. 8-bit bytes were 7-bit ASCII with the parity bit on (most other implementations had the parity bit off). This was a long time ago, and I'm sure the decisions seemed good at the time, it's just that everyone decided differently! Jan 4 at 16:29
  • 3
    All zeroes being a valid (dereferenceable, with modifiable contents, sometimes with a non-zero value) memory address did not prevent many a system from using all zeroes as the null pointer. Having a null pointer be a magic value such that some valid pointers will compare less than NULL, and some greater, could allow to tell if a pointer is to the heap or to the stack, for example.
    – Leo B.
    Jan 4 at 17:16
2

Assembler is a high-level language, when you spend months doing the thing in raw octal code. Grace Hopper introduced the nice mnemonics for assembler etc.

Raw binary requires you to be aware of individual positions of routines, rather than jump to a label. BASIC followed that idea, but there you were free to use unused numbers in the code.

4
  • 5
    Do you have any reference for Hopper being the first to use assembler mnemonics? She didn't join Eckert-Mauchley until 1949; by that time Wheeler's "initial orders" for EDSAC had alphabetic opcodes ("A" for "add"), though admittedly that was a consequence of the machine code itself. Jan 4 at 13:45
  • 1
    I'm actually upvoting this because its technically correct. It is pretty clear the intent of the question was for a higher-level language than the CPU's assembler though.
    – T.E.D.
    Jan 4 at 15:11
  • Regardless of whether you want to argue that assembly is a high-level language, the question clearly states that it is looking for a non-assembly answer. (Nor is the question looking for C, even though that is definitely a HLL.)
    – DrSheldon
    Jan 4 at 18:45
  • It really means what you mean by 'higher language'. 8-bit machines in the 80s ran on rom-basic, which had callable points, but these were just line numbers, rather than names. The rombasic I used did not allow you to pass variables to a routine. You essentially set an accumulator and operated on that. The markup language that my web page is written in, passes through three compilers. The first is simply an on-off printer, the second is a program that can give output in any language (weave), the third is the actual markup. Jan 5 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.