Pascal: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(→‎Revisions: added ND PASCAL for ND-500 Revision B06)
(Extended, and describing the two main Pascal implementations. Work in progress.)
Line 1: Line 1:
The [http://en.wikipedia.org/wiki/Pascal_%28programming_language%29 Pascal] programming language is available.
The [http://en.wikipedia.org/wiki/Pascal_%28programming_language%29 Pascal] programming language is available.
{{Stub}}
==Revisions==
;B06: ND-211001B06 ND PASCAL for ND-100. Date: 19890509.<ref>[http://sintran.com/sintran/library/libsis/ND-211001B06-1.pdf] sintran.com, Norsk Data library, SIS</ref>. ND-211003B06 ND PASCAL for ND-500. Date: 19890510.<ref>[http://sintran.com/sintran/library/libsis/ND-211003B06-1.pdf] sintran.com, Norsk Data library, SIS</ref>


==Sources==
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<ref>{{ND-doc|60.086}}</ref>, a reference implementation designed to assist development of Pascal for new machines:<ref>https://archive.org/stream/bitsavers_pascalNewsep76_7681244/05_Pascal_Newsletter_Sep76_djvu.txt</ref>
{{ND-doc|60.124}}
{{DocPreStart}}
PASCAL Trunk Compiler
 
In 1975, H. H. Nageli 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 comnents are provided for an implementor
how to describe algorithms for these machine dependent parts. [..]
 
H. H. Nageli is at the Institut fur Informatik, E.T.H., Zurich.
{{DocPreEnd}}
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 newer ISO 7185 [http://www.standardpascal.org/ 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]]'''<ref>{{ND-doc|60.124}}</ref>.
 
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 shows a subset of this alternative syntax, covering the very common Pascal ''comments'' and ''array'' usage only:
{|class="wikitable" style="text-align: center;"
! Standard Pascal !! ND-Pascal 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 [[wikipedia:Vienna Development Method|Vienna Development Method]] and a specification language called [[wikipedia:Meta-IV|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''' ('''C'''ommon '''A'''bstract '''T'''ree 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.<ref>{{ND-doc|60.222}}</ref>.
 
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 Revisions==
;78-11-01: NORD-10 Pascal. Date: 1978
;
;J 83-xx-xx: ND-Pascal for ND-100 and ND-500. Date: 1983
;K00: ND-Pascal for ND-100 and ND-500. Date: 19851001.<ref>{{ND-doc|60.222}}}</ref>
;A0x: ND-211001A0x ND PASCAL for ND-100. Date: 1986. Various versions, up to A03 (CAT Pascal)
;A0x: ND-211003A0x ND PASCAL for ND-500. Date: 1986. Various versions, up to A03 (CAT Pascal)
;B00: ND-211001B00 ND PASCAL for ND-100. Date: 19870114 (CAT Pascal)
;B02: ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (CAT Pascal) (Possibly unofficial version)
;B04: ND-211003B04 ND PASCAL for ND-500. Date: 19871104 (CAT Pascal)
;B05: ND-211003B05 ND PASCAL for ND-500. Date: 19871109 (CAT Pascal)
;B06: ND-211001B06 ND PASCAL for ND-100. Date: 19890509.<ref>[http://sintran.com/sintran/library/libsis/ND-211001B06-1.pdf] sintran.com, Norsk Data library, SIS</ref>. ND-211003B06 ND PASCAL for ND-500. Date: 19890510.<ref>[http://sintran.com/sintran/library/libsis/ND-211003B06-1.pdf] sintran.com, Norsk Data library, SIS</ref> (CAT Pascal)


== Sources and references ==
{{ND-doc|60.147}}
{{ND-doc|60.147}}
{{ND-doc|60.222}}
<references/>
<references/>
[[Category:Programming Languages]]
[[Category:Programming Languages]]
{{Stub}}

Revision as of 09:41, 9 June 2016

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. Nageli 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 comnents are provided for an implementor how to describe algorithms for these machine dependent parts. [..]

H. H. Nageli is at the Institut fur Informatik, E.T.H., Zurich.

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 newer 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 shows a subset of this alternative syntax, covering the very common Pascal comments and array usage only:

Standard Pascal ND-Pascal 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 Revisions

78-11-01
NORD-10 Pascal. Date: 1978
J 83-xx-xx
ND-Pascal for ND-100 and ND-500. Date: 1983
K00
ND-Pascal for ND-100 and ND-500. Date: 19851001.[5]
A0x
ND-211001A0x ND PASCAL for ND-100. Date: 1986. Various versions, up to A03 (CAT Pascal)
A0x
ND-211003A0x ND PASCAL for ND-500. Date: 1986. Various versions, up to A03 (CAT Pascal)
B00
ND-211001B00 ND PASCAL for ND-100. Date: 19870114 (CAT Pascal)
B02
ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (CAT Pascal) (Possibly unofficial version)
B04
ND-211003B04 ND PASCAL for ND-500. Date: 19871104 (CAT Pascal)
B05
ND-211003B05 ND PASCAL for ND-500. Date: 19871109 (CAT Pascal)
B06
ND-211001B06 ND PASCAL for ND-100. Date: 19890509.[6]. ND-211003B06 ND PASCAL for ND-500. Date: 19890510.[7] (CAT Pascal)

Sources and references

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

  1. Norsk Data Document ND–60.086 NORD-10 PASCAL
  2. https://archive.org/stream/bitsavers_pascalNewsep76_7681244/05_Pascal_Newsletter_Sep76_djvu.txt
  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 PASCAL Reference Manual }
  6. [1] sintran.com, Norsk Data library, SIS
  7. [2] sintran.com, Norsk Data library, SIS