• Zilog's PLZ/SYS and PLZ/ASM (1978)

    From Lasse =?iso-8859-1?q?Hiller=F8e?= P@21:1/5 to All on Sat Nov 13 08:51:19 2021
    I check Usenet far to infrequently it seems. Tonight I read with interest
    James Harris' posts on a number of - as he calls them - "lesser known languages". Except for Bon, which I will enjoy reading about when I'm
    done with the paper by Rutishauser that I found, I knew of all of them,
    though.

    However, there is a language, which I first "heard" about in a
    programming language "genealogy" graph in a book on "microcomputers",
    back in 1982 or so, which probably deserves the title "lesser known
    language". (There are also some other languages I would like to mention,
    but I will mimick Harris' style and give each a separate post.)

    Actually, it is two languages in this case: PLZ/SYS and PLZ/ASM.
    Information about these languages on the web is very scarce, but I did
    manage to find a link to the defining report on PLZ/SYS, _Report on the Programming Language PLZ/SYS_ by Tod Snook, Charlie Bass, Janet Roberts,
    Armen Nahapetian, Mike Fay (1978) here: https://b-ok.xyz/book/
    2116190/5770ad

    The companion language, PLZ/ASM (or one variant of it) is described in
    this document: Z8 PLZ/ASM Assembly Language Programming Manual (1980) - http://bitsavers.informatik.uni-stuttgart.de/components/zilog/z8/ Z8_Assembly_Language_Programming_Manual_Dec80.pdf

    The PLZ "family" of languages were developed by (or for?) Zilog, and are
    quite interesting, I think. PLZ/SYS is a - for the time - fairly high-
    level systems programming language, based on Pascal and several other
    languages of the era, with a syntax that looks quite Algol 68 inspired. According to the report, it is not intended as a general purpose language
    or for large programs, but it does have modules.

    It is very closely integrated with PLZ/ASM, which comes in several
    flavours, as these are assembler languages for various Zilog CPUs: Z8,
    Z80 and Z8000 seems to be the possibilities. PLZ/ASM extends traditional assembler with structured programming and other higher-level features, so control structure could be written using IF-FI and DO-OD,

    Alas, I haven't been able to find any downloads of the language system.
    Other than the Zilog operating system RIO I don't know of any
    implementations. It would seem that (probably given that export of 8-bit
    cpus to the "communist block" was not prohibited during the Cold War) the language was somewhat popular in East Germany. If someone out there
    should know where to find the compiler, I would very much like to get a
    copy.

    /Lasse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bart@21:1/5 to James Harris on Sat Nov 13 14:52:02 2021
    On 13/11/2021 14:19, James Harris wrote:
    On 13/11/2021 08:51, Lasse Hillerøe Petersen wrote:



    The companion language, PLZ/ASM (or one variant of it) is described in
    this document: Z8 PLZ/ASM Assembly Language Programming Manual (1980) -
    http://bitsavers.informatik.uni-stuttgart.de/components/zilog/z8/
    Z8_Assembly_Language_Programming_Manual_Dec80.pdf

    For anyone who needs the links I think my Usenet client may keep them together:

    https://b-ok.xyz/book/2116190/5770ad

    http://bitsavers.informatik.uni-stuttgart.de/components/zilog/z8/Z8_Assembly_Language_Programming_Manual_Dec80.pdf


    I took a look at both. Z8 assembly code is quite different from what I remember of Z80 programming but I put that down to the Z8 being a microcontroller and, for example, having lots more registers.

    PLZ/SYS looks quite conventional for proto languages: simple but
    covering the bases, something between assembly and a more full-featured
    HLL.

    There have been others - e.g. BCPL and Wirth's PL360 for IBM, perhaps, - which IIRC were written to make an even higher level of language easier
    to develop.

    There was also Babbage for the GEC 4080. (That's the one I ported to
    PDP10 as a college project.)

    One aspect of that one that might appeal, is that there were no operator precedences; expressions were evaluated left-to-right.


    The development path is interesting from a design perspective -
    especially to see how ideas have progressed (or some times regressed)

    In PLZ/SYS, I like how they use BYTE, WORD for unsigned types, and
    INTEGER for signed types. Just like I do now; I thought it was just me
    who favoured that.

    (I don't think I'd come across PLZ before; I'd only heard of PL/M.
    Interesting how isolated you could be at the period, without the
    internet, and not working in academia or in a large company.)

    over the years though I don't know if there's still much value in using
    such languages for real work?!


    They might have some use as intermediate languages used as a target for higher-level ones. Once they've had an upgrade to a wider range of types.

    Perhaps also for bootstrapping, as they ought to be easy to implement,
    fast, and not very big.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Harris@21:1/5 to All on Sat Nov 13 14:19:08 2021
    On 13/11/2021 08:51, Lasse Hillerøe Petersen wrote:

    I check Usenet far to infrequently it seems. Tonight I read with interest James Harris' posts on a number of - as he calls them - "lesser known languages". Except for Bon, which I will enjoy reading about when I'm
    done with the paper by Rutishauser that I found, I knew of all of them, though.

    However, there is a language, which I first "heard" about in a
    programming language "genealogy" graph in a book on "microcomputers",
    back in 1982 or so, which probably deserves the title "lesser known language". (There are also some other languages I would like to mention,
    but I will mimick Harris' style and give each a separate post.)

    Actually, it is two languages in this case: PLZ/SYS and PLZ/ASM.
    Information about these languages on the web is very scarce, but I did
    manage to find a link to the defining report on PLZ/SYS, _Report on the Programming Language PLZ/SYS_ by Tod Snook, Charlie Bass, Janet Roberts, Armen Nahapetian, Mike Fay (1978) here: https://b-ok.xyz/book/
    2116190/5770ad

    The companion language, PLZ/ASM (or one variant of it) is described in
    this document: Z8 PLZ/ASM Assembly Language Programming Manual (1980) - http://bitsavers.informatik.uni-stuttgart.de/components/zilog/z8/ Z8_Assembly_Language_Programming_Manual_Dec80.pdf

    For anyone who needs the links I think my Usenet client may keep them
    together:

    https://b-ok.xyz/book/2116190/5770ad

    http://bitsavers.informatik.uni-stuttgart.de/components/zilog/z8/Z8_Assembly_Language_Programming_Manual_Dec80.pdf

    I took a look at both. Z8 assembly code is quite different from what I
    remember of Z80 programming but I put that down to the Z8 being a microcontroller and, for example, having lots more registers.

    PLZ/SYS looks quite conventional for proto languages: simple but
    covering the bases, something between assembly and a more full-featured
    HLL.

    There have been others - e.g. BCPL and Wirth's PL360 for IBM, perhaps, -
    which IIRC were written to make an even higher level of language easier
    to develop.

    In fact, my initial language was intended for the same purpose. It's
    simple enough to compile using assembly but comprehensive enough to
    allow real HLL code to be written in. Its biggest test so far has been
    to compile itself, which it can do, but in the back of my mind is a
    niggle that I may one day come across something which it cannot do and
    cannot produce a later language which can do. :-(


    The PLZ "family" of languages were developed by (or for?) Zilog, and are quite interesting, I think. PLZ/SYS is a - for the time - fairly high-
    level systems programming language, based on Pascal and several other languages of the era, with a syntax that looks quite Algol 68 inspired. According to the report, it is not intended as a general purpose language
    or for large programs, but it does have modules.

    It is very closely integrated with PLZ/ASM, which comes in several
    flavours, as these are assembler languages for various Zilog CPUs: Z8,
    Z80 and Z8000 seems to be the possibilities. PLZ/ASM extends traditional assembler with structured programming and other higher-level features, so control structure could be written using IF-FI and DO-OD,

    Alas, I haven't been able to find any downloads of the language system.
    Other than the Zilog operating system RIO I don't know of any implementations. It would seem that (probably given that export of 8-bit
    cpus to the "communist block" was not prohibited during the Cold War) the language was somewhat popular in East Germany. If someone out there
    should know where to find the compiler, I would very much like to get a
    copy.

    The development path is interesting from a design perspective -
    especially to see how ideas have progressed (or some times regressed)
    over the years though I don't know if there's still much value in using
    such languages for real work?!



    --
    James Harris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Harris@21:1/5 to Bart on Sat Nov 13 15:36:50 2021
    On 13/11/2021 14:52, Bart wrote:
    On 13/11/2021 14:19, James Harris wrote:

    ...

    The development path is interesting from a design perspective -
    especially to see how ideas have progressed (or some times regressed)

    In PLZ/SYS, I like how they use BYTE, WORD for unsigned types, and
    INTEGER for signed types. Just like I do now; I thought it was just me
    who favoured that.

    It's a bit weird how they are declared though. E.g. IIRC there's a line something like

    i j selected BYTE

    which looks the wrong way round to me. Blame the Pascal influence.


    (I don't think I'd come across PLZ before; I'd only heard of PL/M. Interesting how isolated you could be at the period, without the
    internet, and not working in academia or in a large company.)

    True. I'd forgotten until recently how difficult it was back then even
    to obtain a compiler!


    --
    James Harris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bart@21:1/5 to James Harris on Sat Nov 13 17:46:46 2021
    On 13/11/2021 15:36, James Harris wrote:
    On 13/11/2021 14:52, Bart wrote:
    On 13/11/2021 14:19, James Harris wrote:

    ...

    The development path is interesting from a design perspective -
    especially to see how ideas have progressed (or some times regressed)

    In PLZ/SYS, I like how they use BYTE, WORD for unsigned types, and
    INTEGER for signed types. Just like I do now; I thought it was just me
    who favoured that.

    It's a bit weird how they are declared though. E.g. IIRC there's a line something like

      i j selected BYTE

    which looks the wrong way round to me. Blame the Pascal influence.

    That's Go-like I think, but also it seems kike your style with minimum punctuation.

    (Having keywords in capitals would also grate; it's not clear why that
    was needed. Algol68's reason is that white-space is not meaningful, so
    'int abc' would be lexed as 'intabc'.)


    (I don't think I'd come across PLZ before; I'd only heard of PL/M.
    Interesting how isolated you could be at the period, without the
    internet, and not working in academia or in a large company.)

    True. I'd forgotten until recently how difficult it was back then even
    to obtain a compiler!

    Once you'd even located a compiler, you also needed to pay for it!

    The next problem was, getting it into your machine, as every machine
    used its own incompatible disk format, even for same disk type.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Walker@21:1/5 to Bart on Sat Nov 13 22:35:12 2021
    On 13/11/2021 17:46, Bart wrote:
    (Having keywords in capitals would also grate; it's not clear why
    that was needed. Algol68's reason is that white-space is not
    meaningful, so 'int abc' would be lexed as 'intabc'.)

    Not at all the reason. With reserved-word stropping
    [which is what you seem to be advocating], "int" is a reserved
    word, so "int abc" lexes as a type and an identifier; other
    stropping regimes have their own rules. Even as late as the
    '70s, 20-odd years after the early Algols, there was no general
    expectation that lower-case letters might be available [esp
    (but not only) on teletypes, card equipment and lineprinters],
    so upper case always had to be possible and was quite often
    essential. White space is meaningful in plenty of places in
    Algol 68, though not in the middle of identifiers; see, for
    example, RR9.4.2.2b on representations, esp the last sentence.

    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Bull

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bart@21:1/5 to Andy Walker on Sat Nov 13 23:43:38 2021
    On 13/11/2021 22:35, Andy Walker wrote:
    On 13/11/2021 17:46, Bart wrote:
    (Having keywords in capitals would also grate; it's not clear why
    that was needed. Algol68's reason is that white-space is not
    meaningful, so 'int abc' would be lexed as 'intabc'.)

        Not at all the reason.  With reserved-word stropping
    [which is what you seem to be advocating], "int" is a reserved
    word, so "int abc" lexes as a type and an identifier;  other
    stropping regimes have their own rules.  Even as late as the
    '70s, 20-odd years after the early Algols, there was no general
    expectation that lower-case letters might be available [esp
    (but not only) on teletypes, card equipment and lineprinters],
    so upper case always had to be possible and was quite often
    essential.  White space is meaningful in plenty of places in
    Algol 68, though not in the middle of identifiers;  see, for
    example, RR9.4.2.2b on representations, esp the last sentence.



    A68G allows a declaration like this:

    INTabc def = 1234;

    print(abc def);

    Are you saying that if normal-case reserved words were used, then I
    would instead have to write:

    int abc def = 1234; ?

    And that I could declare an identifier 'intabc' ? What about something like:

    if abc then ...

    Could I have an identifier like 'abc then', or would it be necessary to eliminate white space within identifiers?

    I think that a more conventional way of writing source code (ie. like
    most languages now) would make it more acceptable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Walker@21:1/5 to Bart on Sun Nov 14 21:43:34 2021
    On 13/11/2021 23:43, Bart wrote:
    A68G allows a declaration like this:
      INTabc def = 1234;
      print(abc def);
    Are you saying that if normal-case reserved words were used, then I
    would instead have to write:
      int abc def = 1234; ?

    That's the idea [of course].

    And that I could declare an identifier 'intabc' ? What about [...].

    So many questions! There is a report by Hansen and Boom
    which describes the situation in the late '70s. As I have no
    personal interest in this, I don't know the details, esp not of
    what happened more recently.

    I think that a more conventional way of writing source code (ie. like
    most languages now) would make it more acceptable.

    It's a point of view. Personally, I like the bold and
    italic version as in the publication language. It's part of what
    interested people in Algol in the first place. What you have to
    write in articles like this is much less interesting.

    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Paderewski

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse =?iso-8859-1?q?Hiller=F8e?= P@21:1/5 to Bart on Mon Nov 15 08:09:10 2021
    On Sat, 13 Nov 2021 17:46:46 +0000, Bart wrote:

    On 13/11/2021 15:36, James Harris wrote:

    It's a bit weird how they are declared though. E.g. IIRC there's a line
    something like

      i j selected BYTE

    which looks the wrong way round to me. Blame the Pascal influence.

    Like many others, I began with Pascal and switched to C. I just don't
    know which declaration style is right: type before or type after. Or what
    the best use of colon is in a language, for that matter.

    Interesting to note about PLZ is that it is completely separator-free.
    You may intersperse commas and semicolons if you like, but they are
    completely redundant in the grammar. No "semicolon insertion" rules, and
    I believe the grammar can be made "reasonably" LL(1) despite this. It may
    need symbol magic (interaction between lexer and symbol table) to
    distinguish type identifiers. Much like C.

    That's Go-like I think, but also it seems kike your style with minimum punctuation.

    Go-like? PLZ preceded Go by some 30+ years, so if anything, Go is PLZ-
    like! :-)

    (Having keywords in capitals would also grate; it's not clear why that
    was needed. Algol68's reason is that white-space is not meaningful, so
    'int abc' would be lexed as 'intabc'.)

    The books mostly use capitals for reserved words, a convention that was
    fairly common in the late 70es and 80es. Of course, some Ada programmers reversed the style and used lower case for reserved words and all
    capitals for identifiers. But in any case, it's just a convention, as all
    these languages are not case sensitive.

    /Lasse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse =?iso-8859-1?q?Hiller=F8e?= P@21:1/5 to James Harris on Mon Nov 15 08:56:04 2021
    On Sat, 13 Nov 2021 14:19:08 +0000, James Harris wrote:
    For anyone who needs the links I think my Usenet client may keep them together:

    Thank you, I didn't notice that they had been split.

    I took a look at both. Z8 assembly code is quite different from what I remember of Z80 programming but I put that down to the Z8 being a microcontroller and, for example, having lots more registers.

    If I am not mistaken, Zilog began with the Z80, which was based on and backwards compatible with Intel's 8080. For copyright reasons, they had
    to design a new assembler notation for the Z80, which mapped the original
    8080 instructions but also included many new ones, resulting in quite a
    mess. When they then designed their own CPU architectures, Z8 and Z8000,
    they of course used a similar notation, but much simpler.

    Alas, I have been unable to find a PLZ/ASM definition for Z80, though I
    am sure it must exist.

    PLZ/SYS looks quite conventional for proto languages: simple but
    covering the bases, something between assembly and a more full-featured
    HLL.

    It is a layered model. At the bottom you have the /ASM layer, which is CPU-specific. Above, you have /SYS, the system level: reasonably machine independent, but still also fairly low level. You could in principle
    extend that stack upwards. I suppose that is what Martin Richards did to
    some degree with MCPL. According to other sources, it was the intention
    of Zilog to also have existing languages integrated in the PLZ system,
    like COBOL and FORTRAN.

    This is one more interesting thing about the PLZ system. There was the
    PLZ/SYS compiler, PLZSYS, which generated an intermediate code (what we
    now call bytecode or VM code - I don't know if Wirth's P-code for Pascal
    was the first example of this), and the PLZ/ASM translator, FILTER, which transformed PLZ/ASM to "plain" assembler. Corresponding to that, was the
    code generator, PLZCG, which transformed the intermediate code to
    assembler. However, the intermediate code could also be executed directly
    by an interpreter, ZINTER, which could itself linked together with
    machine code modules resulting from PLZCG or FILTER, using the special
    linker PLINK, so parts of a program could run interpreted, whereas others
    ran as native code. This was more memory efficient. It is not a far step
    from this to having Just-In-Time compilation...

    I have no idea if some of these ideas were original at the time, but it certainly was an ambitious concept.

    There have been others - e.g. BCPL and Wirth's PL360 for IBM, perhaps, - which IIRC were written to make an even higher level of language easier
    to develop.

    Yes, I believe PL360 was a "structured assembly language" for the 360 to
    write Algol-W. Per Brinch-Hansen did something similar with his Edison
    project, but I'll leave that for another post.

    /Lasse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to All on Mon Nov 15 10:48:22 2021
    On 2021-11-15 09:56, Lasse Hillerøe Petersen wrote:

    I have no idea if some of these ideas were original at the time, but it certainly was an ambitious concept.

    DEC FORTRAN-IV compiler for PDP-11 used executable intermediate code
    which was more dense than the direct code. It was called "indirect
    threaded code." Each instruction was an address of a subprogram "called"
    using simple jump. The return was another jump. Instead of the machine
    program counter an independent register (R4?) was used to keep track.

    https://telinks.wordpress.com/2017/11/25/threaded-code-james-r-bell-digital-equipment-corporation/

    https://en.wikipedia.org/wiki/Threaded_code

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)