Pascal: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(Add B03 version, re-organised a bit)
(→‎Sources and references: link to a paper about CAT)
 
(16 intermediate revisions by 2 users not shown)
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}}


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>
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>
Line 5: Line 6:
PASCAL Trunk Compiler  
PASCAL Trunk Compiler  


In 1975, H. H. Nageli developed a "trunk" compiler to help transport Pascal  
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  
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  
in Pascal, in which machine dependent parts are marked and clearly separated from  
machine independent parts, and detailed comnents are provided for an implementor  
machine independent parts, and detailed comments are provided for an implementor  
how to describe algorithms for these machine dependent parts. [..]  
how to describe algorithms for these machine dependent parts. [..]  


H. H. Nageli is at the Institut fur Informatik, E.T.H., Zurich.
H. H. Nägeli is at the Institut für Informatik, E.T.H., Zürich.
{{DocPreEnd}}
{{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 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 [http://pascal-central.com/docs/pascal1973.pdf ''The Programming Language Pascal (Revised Report)'' (1973)], not the later [http://www.standardpascal.org/ 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
* 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
* 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>.
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:
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 [http://pascal-central.com/iso7185.html|ISO 7185 Standard Pascal] ([http://pascal-central.com/iso7185.html#6.1.9%20Token%20separators] and [http://pascal-central.com/iso7185.html#6.1.9%20Lexical%20alternatives]) and may have already been suggested in the Trunk source (which seems to have been lost by now, so this cannot be confirmed).
 
{|class="wikitable" style="text-align: center;"
{|class="wikitable" style="text-align: center;"
! Standard Pascal !! ND-Pascal alternative
! 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 [[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.  
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).
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_(programming_language)|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>.
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>.
Line 44: Line 50:
;78-11-01: NORD-10 Pascal. Date: 1978
;78-11-01: NORD-10 Pascal. Date: 1978
;
;
;J 83-xx-xx: ND-Pascal for ND-100 and ND-500. Date: 1983
;H : [[ND-10076H]] ND-Pascal for ND-100. Date: 1982.05.05
;K00: ND-Pascal for ND-100 and ND-500. Date: 19851001.<ref>{{ND-doc|60.222}}}</ref>
;J 83-xx-xx: ND-Pascal for ND-100 ([[ND-10076J]]) and ND-500. Date: 1983.12.07
;K00: ND-Pascal for ND-100 and ND-500. Date: 19851001.<ref>{{ND-doc|60.222.1|page 174}}</ref>


===CAT Pascal===
===CAT Pascal===
Line 52: Line 59:
: ND-211003A0x ND PASCAL for ND-500. Date: 1986. Various versions, up to A03
: ND-211003A0x ND PASCAL for ND-500. Date: 1986. Various versions, up to A03
;B00: ND-211001B00 ND PASCAL for ND-100. Date: 19870114
;B00: ND-211001B00 ND PASCAL for ND-100. Date: 19870114
;B02: ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (Possibly unofficial version)
;B02: ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (Possibly an unofficial version)
;B03:
;B03:
: ND-211001B03 ND PASCAL for ND-100. Date: 19870904
: ND-211001B03 ND PASCAL for ND-100. Date: 19870904
Line 61: Line 68:
: 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-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>
: 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>
== Product number ==
* [[:Category:ND-10076|ND-10076]]
* [[:Category:ND-10133|ND-10133]]
* [[:Category:ND-10187|ND-10187]]
* [[:Category:ND-211003|ND-211003]]


== Sources and references ==
== Sources and references ==
{{ND-doc|60.086.02}} printed June 1979
{{ND-doc|60.124.03}} printed December 1980
{{ND-doc|60.124.05}} printed January 1984
{{ND-doc|60.147}}
{{ND-doc|60.147}}
<references/>
<references/>
* [https://dl.acm.org/doi/abs/10.1145/502874.502894 A multi-language compiler system with automatically generated codegenerators - SIGPLAN '84 - June 1984]
[[Category:Programming Languages]]
[[Category:Programming Languages]]
{{Stub}}
[[Category:Norsk Data software]]

Latest revision as of 19:35, 4 April 2020

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

78-11-01
NORD-10 Pascal. Date: 1978
H
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
K00
ND-Pascal for ND-100 and ND-500. Date: 19851001.[5]

CAT Pascal

A0x
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
B00
ND-211001B00 ND PASCAL for ND-100. Date: 19870114
B02
ND-211003B02 ND PASCAL for ND-500. Date: 19870703 (Possibly an unofficial version)
B03
ND-211001B03 ND PASCAL for ND-100. Date: 19870904
ND-211003B03 ND PASCAL for ND-500. Date: 19870904
B04
ND-211003B04 ND PASCAL for ND-500. Date: 19871104
B05
ND-211003B05 ND PASCAL for ND-500. Date: 19871109
B06
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
  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.1 PASCAL Reference Manual page 174
  6. [1] sintran.com, Norsk Data library, SIS
  7. [2] sintran.com, Norsk Data library, SIS