In the early days of personal computers, everything was limited. There was little RAM, little (if any storage) and slow 8-bit CPUs. Those computers were primarily programmed in two languages: BASIC and Assembly Language.

When the next generation of 16-bit computers came out, they were much faster, had way more RAM and always came with a reasonably speedy floppy (and later, a hard drive). That meant that people started moving away from BASIC and Assembly Language. On those machines, higher-level compiled languages started to take hold.

First was the Apple Lisa and Macintosh which used Pascal as its system language.

In 1985 the Atari ST appeared and its system software was primarily written in C.

The Amiga also appeared about the same time and also used C.

Note that those systems also used a fair amount of assembly language mixed in, especially when it came to things that need to be fine-tuned to use less memory or be more performant. But the system APIs were all based on either Pascal or C.

I think that PCs with DOS focused on assembly at the start, but eventually started switching over to C as they got more RAM and CPU speed which allowed more complex apps and GUI systems.

But there was another language that was commonly talked about at the beginning of this era and it was Modula-2, designed by the creator of Pascal, Niklaus Wirth.

This is especially evident if you spent much time reading Byte magazine and Jerry Pournelle’s Chaos Manor column. He was a big fan of Modula-2 and would write about it often, also talking about the Lilith computer that originated it.

Since it appeared about the same time as Modula-2, the Atari ST had several Module-2 compilers available for it:

TDI

Megamax

At least one in the public domain

I’ll talk more about the various Atari ST versions in part 2, available to paid subscribers soon.

Some Modula-2 History

Pascal was created as a teaching language in 1970. It grew from there and professional compilers for it started appearing throughout the 70s and 80s. In order to make Pascal robust enough to create actual applications on computers there were many extensions that were added, resulting in many different Pascal dialects. There was an ISO standard around 1983, but in my experience most Pascal implementations were subtly different than each other. In particular, Pascal did not have a standard way to manage libraries, something that was often needed with larger programs.

The “units” implemented by Turbo Pascal probably became the de-facto standard for libraries.

Nicklaus Wirth felt that something more suitable to operating systems and application development was needed so he began work on Modula. This became Modula-2 and would be essentially finalized around 1984 or so.

If you looked at Modula-2 code you would find a strong resemblance to Pascal. Here you can see some of the code for the 8 Queens Problem that I originally wrote in Pascal back in 1989 and later ported to Modula-2:

MODULE eightqueensproblem; (* Eight Queens Solution by Paul Lefebvre 3-20-89 This program will find and display all 92 ways to place 8 queens on a chessboard. *) FROM InOut IMPORT WriteInt,WriteString,WriteLn; TYPE rowtype = ARRAY[1..8] OF BOOLEAN; sumtype = ARRAY[2..16] OF BOOLEAN; diftype = ARRAY[-7..7] OF BOOLEAN; picktype = ARRAY[1..8] OF INTEGER; VAR rowchk : rowtype; (* Values contain TRUE if row unavailable *) diagsum : sumtype; (* Values contain TRUE if daigonal unavailable *) diagdif : diftype; (* Values contain TRUE if diagonal unavailable *) picked : picktype; (* Contains the row number of each column *) i : INTEGER; (* ---------------------------------------------------------------------- *) PROCEDURE displaysolution(picked : picktype; VAR solnum : INTEGER); (* This procedure will display the solution that was found to the screen *) VAR i, j : INTEGER; BEGIN solnum := solnum + 1; (* Keep a running count of the solutions *) WriteLn; WriteLn; (* This puts the actual chessboard on the screen *) FOR i := 1 TO 8 DO FOR j := 1 TO 8 DO IF (picked[j] = i) THEN WriteString('Q '); ELSE WriteString('+ '); END; END; WriteLn; END; WriteString('That is solution number '); WriteInt(solnum,2); WriteLn; END displaysolution; (* displaysolution *)

View 8Queens in Modula-2 source code

Modula-2 started strong with several compilers appearing early on, but it seems to have fizzled just as quickly. I think the reason Modula-2 did not catch on was twofold: Turbo Pascal and C.

For those that wanted a highly structured language, Pascal was already pretty good. And the extensions provided by Turbo Pascal made it work great for application development, including many things that Modula-2 was also bringing to the table. Turbo Pascal was so fast, so affordable and became so popular that it just crushed any chance for Modula-2 to supplant it.

For those that wanted something less structured than Pascal, C quickly became the standard. It was commonly used a systems and application programming language which also meant that Modula-2 had no room in those markets either.

For example, when I was in college in the late 80s/early 90s studying Computer Science, Pascal was used as the starter language and then C was used after that. To be fair, Modula-2 could probably have served the needs of both the beginner and more seasoned programmer, but that’s just not how it worked out.

Niklaus Wirth kept working on languages and apparently there was a Modula-3, but outside of academic circles that never went anywhere.

His next language was Oberon, which was an attempt to keep the power of Modula-2 but without its complexity. Introduced in 1987, Oberon was also object-oriented, a relatively new concept at the time. Oberon continued to evolve over the years, but never become a commonly used language. I personally have never used it.

If you’d like to learn more about Oberon, you might enjoy the book Project Oberon: The Design of an Operating System and Compiler by Wirth and Gutknecht.

Share