From NDWiki
Jump to navigation Jump to search

The Pascal programming language is available.

The first Norsk Data Pascal compiler was called NORD-10 Pascal, and was a compiler derived from the Pascal TRUNK compiler developed at ETH, Zurich[1], a reference implementation designed to assist development of Pascal for new machines:[2]

PASCAL Trunk Compiler

In 1975, H. H. Nägeli developed a "trunk" compiler to help transport Pascal compilers to other machines. The trunk is a source program of a compiler written in Pascal, in which machine dependent parts are marked and clearly separated from machine independent parts, and detailed comments are provided for an implementor how to describe algorithms for these machine dependent parts. [..]

H. H. Nägeli is at the Institut für Informatik, E.T.H., Zürich.

The compiler itself and parts of the runtime library are written in Pascal. The first version was introduced in 1977. It is a fairly normal Standard Pascal, although the standard as described in Wirth's The Programming Language Pascal (Revised Report) (1973), not the later ISO 7185 Standard Pascal.

The ND version has some extensions to better support the ND architecture and SINTRAN. The original NORD-10 version also had a couple of restrictions:

  • The DISPOSE standard function (works as 'free' in C) was not implemented, memory de-allocation had to be coded by other means
  • File variables could only be declared in the main program

These restrictions were removed when the compiler later evolved into ND-Pascal for ND-100 and ND-500[3].

Due to the fact that Norsk Data terminals often used character sets where the ASCII characters {, [, }, and ] (among others) were replaced with Nordic characters, e.g. æ, Æ, å, Å, ND-Pascal implemented alternative optional representation for those characters. The following table includes this alternative syntax for Pascal comments and indexing symbols, and also the "↑" token (which is defined as equivalent to "^" in ISO Pascal). These ND-Pascal lexical alternatives became part of the later 7185 Standard Pascal ([3] and [4]) and may have already been suggested in the Trunk source (which seems to have been lost by now, so this cannot be confirmed).

Wirth Standard Pascal Wirth ASCII alternative Wirth EBCDIC alternative ND-Pascal alternative ISO 7185 alternative
{ /* /* (* (*
} */ */ *) *)
[ [ (. (. (.
] ] .) .) .)
@ @ @ ^,@

In 1982 Norsk Data started cooperating with the University of Kiel, Germany, in the development of a machine independent compiler system for several source languages, using the Vienna Development Method and a specification language called META IV. The source code is compiled by a language-specific (e.g. C, Pascal, Basic) front-end into a common intermediate language called CAT (Common Abstract Tree Language), which is then compiled by a common back-end into native code.

One outcome of this was CAT PASCAL, a front-end for Pascal. The initial version was A00, followed by updates until A03 (TBC). These versions were somewhat slow due to a lot of internal packing and unpacking of data structures. From version B00 performance improved (this also applies to the similarly versioned C CAT compilers).

The CAT Pascal language, although being a completely different implementation, was fully backwards compatible with the later versions of earlier non-CAT ND Pascal compilers, so much so that the same Pascal Reference Manual was used for both.[4].

Due to the multi-stage, separate front- and back-ends, cross compilers were as easy to implement as native compilers. Thus there were also CAT Pascal compilers for ND-100 that generated executable code for ND-500/5000, and the other way around.

Known Versions

TRUNK-based Pascal

NORD-10 Pascal. Date: 1978
ND-10076H ND-Pascal for ND-100. Date: 1982.05.05
J 83-xx-xx
ND-Pascal for ND-100 (ND-10076J) and ND-500. Date: 1983.12.07
ND-Pascal for ND-100 and ND-500. Date: 19851001.[5]

CAT Pascal

ND-211001A0x ND PASCAL for ND-100. Date: 1986. Various versions, up to A03
ND-211003A0x ND PASCAL for ND-500. Date: 1986. Various versions, up to A03
ND-211001B00 ND PASCAL for ND-100. Date: 19870114
ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (Possibly an unofficial version)
ND-211001B03 ND PASCAL for ND-100. Date: 19870904
ND-211003B03 ND PASCAL for ND-500. Date: 19870904
ND-211003B04 ND PASCAL for ND-500. Date: 19871104
ND-211003B05 ND PASCAL for ND-500. Date: 19871109
ND-211001B06 ND PASCAL for ND-100. Date: 19890509.[6]
ND-211003B06 ND PASCAL for ND-500. Date: 19890510.[7]

Product number

Sources and references

Norsk Data Document ND–60.086.02 NORD-10 PASCAL printed June 1979

Norsk Data Document ND–60.124.03 ND-PASCAL USER'S GUIDE printed December 1980

Norsk Data Document ND–60.124.05 ND-PASCAL USER'S GUIDE printed January 1984

Norsk Data Document ND–60.147 ND-500 PASCAL Compiler User's Guide

  1. Norsk Data Document ND–60.086 NORD-10 PASCAL
  3. Norsk Data Document ND–60.124 ND-PASCAL USER'S GUIDE
  4. Norsk Data Document ND–60.222 PASCAL Reference Manual
  5. Norsk Data Document ND–60.222.1 PASCAL Reference Manual page 174
  6. [1], Norsk Data library, SIS
  7. [2], Norsk Data library, SIS