Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The universe is all a spin-off of the Big Bang.


devel / comp.lang.c / PL/M

SubjectAuthor
* PL/Mmuta...@gmail.com
+- Re: PL/MBob McConnell
`* Re: PL/MBart
 `* Re: PL/MPaul Edwards
  +- Re: PL/MBart
  `* Re: PL/MEd Prochak
   `* Re: PL/MPaul Edwards
    `* Re: PL/Maph
     +* Re: PL/MEd Prochak
     |`- Re: PL/MBart
     `* Re: PL/MPaul Edwards
      `* Re: PL/Maph
       +* Re: PL/MBart
       |`- Re: PL/MPaul Edwards
       `* Re: PL/MPaul Edwards
        +* Re: PL/MPaul Edwards
        |`* Re: PL/MEd Prochak
        | `- Re: PL/MSpiros Bousbouras
        +* Re: PL/MEd Prochak
        |`* Re: PL/MPaul Edwards
        | +* Re: PL/MScott Lurndal
        | |`- Re: PL/MLew Pitcher
        | +* Re: PL/MDavid Brown
        | |`* Re: PL/MPaul Edwards
        | | `* Re: PL/MDavid Brown
        | |  +* Re: PL/MScott Lurndal
        | |  |`* Re: PL/MPaul Edwards
        | |  | `* Re: PL/MVir Campestris
        | |  |  `* Re: PL/MKenny McCormack
        | |  |   `- Re: PL/MKaz Kylheku
        | |  `* Re: PL/MPaul Edwards
        | |   +* Re: PL/MBart
        | |   |`- Re: PL/MJoe Monk
        | |   `* Re: PL/MDavid Brown
        | |    `- Re: PL/MPaul Edwards
        | +* Re: PL/MEd Prochak
        | |+* Re: PL/MPaul Edwards
        | ||`* Re: PL/MEd Prochak
        | || +* Re: PL/Maph
        | || |`- Re: PL/MJoe Monk
        | || `- Re: PL/MPaul Edwards
        | |`* Re: PL/MVir Campestris
        | | `- Re: PL/MBart
        | `* Re: PL/MBart
        |  `* Re: PL/MPaul Edwards
        |   `* Re: PL/MEd Prochak
        |    `* Re: PL/MPaul Edwards
        |     `* Re: PL/MEd Prochak
        |      `* Re: PL/MPaul Edwards
        |       +- Re: PL/Mjak
        |       `- Re: PL/Mjak
        `* Re: PL/MBen Bacarisse
         `* Re: PL/MPaul Edwards
          `- Re: PL/MBen Bacarisse

Pages:123
PL/M

<0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26339&group=comp.lang.c#26339

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:2548:b0:767:e807:e4fe with SMTP id s8-20020a05620a254800b00767e807e4femr84553qko.4.1689807377187;
Wed, 19 Jul 2023 15:56:17 -0700 (PDT)
X-Received: by 2002:a05:6808:159b:b0:3a3:efef:5c74 with SMTP id
t27-20020a056808159b00b003a3efef5c74mr7187101oiw.8.1689807376776; Wed, 19 Jul
2023 15:56:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 19 Jul 2023 15:56:16 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
Subject: PL/M
From: mutazi...@gmail.com (muta...@gmail.com)
Injection-Date: Wed, 19 Jul 2023 22:56:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: muta...@gmail.com - Wed, 19 Jul 2023 22:56 UTC

CP/M-80 was written in PL/M.

Is there any technical reason why it couldn't have
been written in C90 instead (if the language had
existed at the time)?

ie does C produce code too inefficiently or not
provide the ability to do something that PL/M
provides?

I wasn't aware that these small machines could
handle being programmed in a language other
than assembler (at least for something critical
like the OS).

MSDOS wasn't written in PL/M - why not?

Thanks. Paul.

Re: PL/M

<17736c61e07e90c1$370$2302728$baa1eca3@news.newsdemon.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26344&group=comp.lang.c#26344

  copy link   Newsgroups: comp.lang.c
From: rmcco...@lightlink.com (Bob McConnell)
Subject: Re: PL/M
Newsgroups: comp.lang.c
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
Mime-Version: 1.0
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 25
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.newsdemon.com!not-for-mail
Date: Thu, 20 Jul 2023 00:37:32 +0000
Nntp-Posting-Date: Thu, 20 Jul 2023 00:37:32 +0000
X-Received-Bytes: 1399
Organization: NewsDemon - www.newsdemon.com
X-Complaints-To: abuse@newsdemon.com
Message-Id: <17736c61e07e90c1$370$2302728$baa1eca3@news.newsdemon.com>
 by: Bob McConnell - Thu, 20 Jul 2023 00:37 UTC

On Wed, 19 Jul 2023 15:56:16 -0700 (PDT), muta...@gmail.com wrote:

> CP/M-80 was written in PL/M.
>
> Is there any technical reason why it couldn't have been written in C90
> instead (if the language had existed at the time)?
>
> ie does C produce code too inefficiently or not provide the ability to
> do something that PL/M provides?
>
> I wasn't aware that these small machines could handle being programmed
> in a language other than assembler (at least for something critical like
> the OS).
>
> MSDOS wasn't written in PL/M - why not?
>
> Thanks. Paul.

CP/M was first released in 1974, sixteen years before C90 was finalized.
The first version of K&R C was released in 1978. PL/M was the primary
language on the mini computer Gary Kildall used to develop his OS. The
syntax and vocabulary of PL/M is very similar to C, so if you can read
one, you can figure out both.

Bob McConnell

Re: PL/M

<u99vta$2ck7s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26345&group=comp.lang.c#26345

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Thu, 20 Jul 2023 01:42:18 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <u99vta$2ck7s$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 20 Jul 2023 00:42:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e13e49741e984015742a684e1703412";
logging-data="2511100"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18O0PGU5/ARjlzlZP9lDKMXG5W3C/2w9R0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:NUCIIOMuyI/NjzZHsgd9ftDNSr4=
In-Reply-To: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
 by: Bart - Thu, 20 Jul 2023 00:42 UTC

On 19/07/2023 23:56, muta...@gmail.com wrote:
> CP/M-80 was written in PL/M.
>
> Is there any technical reason why it couldn't have
> been written in C90 instead (if the language had
> existed at the time)?
>
> ie does C produce code too inefficiently or not
> provide the ability to do something that PL/M
> provides?

What year was it written?

My company wrote a CP/M clone, they did so using Z80 assembly (this was
around 1982). One constraint was that the OS had to operate within 4-8KB
of memory.

I'd imagine that C compilers of that time, especially for 8080, were not
that sophisticated nor did they optimise. (They would have taken ages to
develop with too; maybe PL/M was simpler and faster to work with.)

BTW which CP/M are we talking about? I can find sources for CP/M 1, 2
and 3, which appear to mix ASM and PL/M. The PL/M looks surprisingly good.

I didn't use it myself, but had used another machine-oriented language.
It was simpler and lower-level than C, if you can imagine that, but was
definitely not assembly.

A C compiler now for those devices, run as a cross-compiler on a modern
PC, would likely do a better job.

Re: PL/M

<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26349&group=comp.lang.c#26349

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:2908:b0:767:ea3b:cecf with SMTP id m8-20020a05620a290800b00767ea3bcecfmr18600qkp.12.1689841462974;
Thu, 20 Jul 2023 01:24:22 -0700 (PDT)
X-Received: by 2002:a05:6808:1514:b0:3a3:b8ab:c211 with SMTP id
u20-20020a056808151400b003a3b8abc211mr1943595oiw.4.1689841462740; Thu, 20 Jul
2023 01:24:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 20 Jul 2023 01:24:22 -0700 (PDT)
In-Reply-To: <u99vta$2ck7s$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 20 Jul 2023 08:24:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2859
 by: Paul Edwards - Thu, 20 Jul 2023 08:24 UTC

On Thursday, July 20, 2023 at 8:42:33 AM UTC+8, Bart wrote:

> > ie does C produce code too inefficiently or not
> > provide the ability to do something that PL/M
> > provides?

> What year was it written?

1974 or something.

> My company wrote a CP/M clone, they did so using Z80 assembly (this was
> around 1982). One constraint was that the OS had to operate within 4-8KB
> of memory.

Yeah - this is what I expected - assembler as the only choice.

> I'd imagine that C compilers of that time, especially for 8080, were not
> that sophisticated nor did they optimise. (They would have taken ages to
> develop with too; maybe PL/M was simpler and faster to work with.)

How did PL/M achieve either of these things?

> BTW which CP/M are we talking about? I can find sources for CP/M 1, 2
> and 3, which appear to mix ASM and PL/M. The PL/M looks surprisingly good..

1 I guess. I just looked at a little bit of one of them and confirmed
that it was in a high level language that looked similar to PL/1.

> I didn't use it myself, but had used another machine-oriented language.
> It was simpler and lower-level than C, if you can imagine that, but was
> definitely not assembly.

That's exactly the problem - I can't imagine that.

> A C compiler now for those devices, run as a cross-compiler on a modern
> PC, would likely do a better job.

I see. Ok, so the problem has been solved.

But if C had been invented at the same time as PL/M and
had the same amount of effort put into it, would it have
always been the equal of PL/M?

Or is there something special about PL/M?

Thanks. Paul.

Re: PL/M

<u9b49f$2m3vt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26362&group=comp.lang.c#26362

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Thu, 20 Jul 2023 12:03:11 +0100
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <u9b49f$2m3vt$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me>
<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 20 Jul 2023 11:03:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e13e49741e984015742a684e1703412";
logging-data="2822141"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FVM/UhiS0zYQVfrhG6es7o3oCk9gDXh4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:c/frq++KjhRuNVqv7RwVWQlVgn8=
In-Reply-To: <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
 by: Bart - Thu, 20 Jul 2023 11:03 UTC

On 20/07/2023 09:24, Paul Edwards wrote:
> On Thursday, July 20, 2023 at 8:42:33 AM UTC+8, Bart wrote:
>
>>> ie does C produce code too inefficiently or not
>>> provide the ability to do something that PL/M
>>> provides?
>
>> What year was it written?
>
> 1974 or something.
>
>> My company wrote a CP/M clone, they did so using Z80 assembly (this was
>> around 1982). One constraint was that the OS had to operate within 4-8KB
>> of memory.
>
> Yeah - this is what I expected - assembler as the only choice.
>
>> I'd imagine that C compilers of that time, especially for 8080, were not
>> that sophisticated nor did they optimise. (They would have taken ages to
>> develop with too; maybe PL/M was simpler and faster to work with.)
>
> How did PL/M achieve either of these things?

The implementations used a mix of PL/M and assembly. Some CP/M routines
would have been independent programs, not resident, so less pressure on
space.

And if it was in 1974, probably they used a cross-compiler; I don't
know. But at that time, it sounds unlikely there was even a C
cross-compiler, for these early microprocessors. The ones from nearly a
decade later seemed bad enough.

The 'M' in PL/M means the language was specially designed for
microprocessors. According to Wikipedia, it had facilities for dealing
with interrupts, accessing cpu flags, and for accessing I/O ports.

>> BTW which CP/M are we talking about? I can find sources for CP/M 1, 2
>> and 3, which appear to mix ASM and PL/M. The PL/M looks surprisingly
good.
>
> 1 I guess. I just looked at a little bit of one of them and confirmed
> that it was in a high level language that looked similar to PL/1.
>
>> I didn't use it myself, but had used another machine-oriented language.
>> It was simpler and lower-level than C, if you can imagine that, but was
>> definitely not assembly.
>
> That's exactly the problem - I can't imagine that.

There are various simplifications that are possible. For example, PL/M
only had two primitive types, equivalent to `u8` and `u16` (BYTE and
ADDRESS).

The u16 type served also as a pointer type.

(My first language for microprocessors in '81 had types equivalent to
u8, i16 and f24. I can't remember how I handled pointers. It was on a
smaller scale than PL/M, and much smaller than C (now it's overtaken C).

It ran directly on the device, and I used it for 3D vector graphics and
for some image processing, obviously in a crude way with a low-res display.)

Re: PL/M

<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26391&group=comp.lang.c#26391

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:a44:b0:635:db77:3570 with SMTP id ee4-20020a0562140a4400b00635db773570mr535qvb.8.1689886109603;
Thu, 20 Jul 2023 13:48:29 -0700 (PDT)
X-Received: by 2002:a05:622a:201:b0:403:acaa:abe0 with SMTP id
b1-20020a05622a020100b00403acaaabe0mr577qtx.8.1689886109322; Thu, 20 Jul 2023
13:48:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 20 Jul 2023 13:48:29 -0700 (PDT)
In-Reply-To: <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:5f82:5000:545a:2982:9d74:ecff;
posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 2600:1700:5f82:5000:545a:2982:9d74:ecff
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Thu, 20 Jul 2023 20:48:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Ed Prochak - Thu, 20 Jul 2023 20:48 UTC

On Thursday, July 20, 2023 at 4:24:31 AM UTC-4, Paul Edwards wrote:
[]
> But if C had been invented at the same time as PL/M and
> had the same amount of effort put into it, would it have
> always been the equal of PL/M?
>
> Or is there something special about PL/M?
>
> Thanks. Paul.

PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was optimized for
the Intel Processors, especially the 8080 family. You had much better control over
memory usage as the sizes of Integers, pointers and character variables were well defined.

I used PL/M for a debugger tool on the 8086. I thought it was a good language
and fought for PL/M versus C when the selection was being made for the next
generation of products at that company. This was around 1984/1985.

I still like PL/M, but ending up using C at many other places I worked. I like C as well.

Enjoy,
Ed

Re: PL/M

<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26395&group=comp.lang.c#26395

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:8282:b0:767:f116:17e0 with SMTP id ox2-20020a05620a828200b00767f11617e0mr304qkn.14.1689895067667;
Thu, 20 Jul 2023 16:17:47 -0700 (PDT)
X-Received: by 2002:a05:6870:5b30:b0:1b0:460c:548b with SMTP id
ds48-20020a0568705b3000b001b0460c548bmr252725oab.3.1689895067366; Thu, 20 Jul
2023 16:17:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 20 Jul 2023 16:17:46 -0700 (PDT)
In-Reply-To: <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.133; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.133
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 20 Jul 2023 23:17:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Paul Edwards - Thu, 20 Jul 2023 23:17 UTC

On Friday, July 21, 2023 at 4:48:38 AM UTC+8, Ed Prochak wrote:

> > But if C had been invented at the same time as PL/M and
> > had the same amount of effort put into it, would it have
> > always been the equal of PL/M?
> >
> > Or is there something special about PL/M?

> PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was optimized for
> the Intel Processors, especially the 8080 family. You had much better control over
> memory usage as the sizes of Integers, pointers and character variables were well defined.

Surely that "issue" in C is easily mitigated by having a "flavor"
of C (if you need to go that far) that has very well-defined
16-bit addresses and 8-bit unsigned chars?

Sure - if you write code according to those assumptions it
won't be portable (not a lot of code is), but it's likely to be
far less work to port it to another environment than if you
threw the baby out with the bathwater and opted for
PL/M instead.

BFN. Paul.

Re: PL/M

<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26466&group=comp.lang.c#26466

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.27.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 22 Jul 2023 13:32:57 +0000
Sender: Andrew Haley <aph@zarquon.pink>
From: aph...@littlepinkcloud.invalid
Subject: Re: PL/M
Newsgroups: comp.lang.c
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com> <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/4.18.0-477.13.1.el8_8.x86_64 (x86_64))
Message-ID: <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
Date: Sat, 22 Jul 2023 13:32:57 +0000
Lines: 19
X-Trace: sv3-CAZ9Z2UZTcOWhEj81UzTI8Xlj6DwNJNF2HSwIkxSnwa9r2cjXjiGK8yDlJEzRQL2NTAay1LC5zkw5mt!Nz8v1aROSvMMz9Ct/hJbN/0pim+4Q+w6kv9l9EPk44pvlkxvSPCzZrhxUEgs7f68ihZlkJvJUDam!C+HYiW2tbqM=
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: aph...@littlepinkcloud.invalid - Sat, 22 Jul 2023 13:32 UTC

Paul Edwards <mutazilah@gmail.com> wrote:
> On Friday, July 21, 2023 at 4:48:38?AM UTC+8, Ed Prochak wrote:
>
>> PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was
>> optimized for the Intel Processors, especially the 8080 family. You
>> had much better control over memory usage as the sizes of Integers,
>> pointers and character variables were well defined.
>
> Surely that "issue" in C is easily mitigated by having a "flavor" of
> C (if you need to go that far) that has very well-defined 16-bit
> addresses and 8-bit unsigned chars?

Not entirely. PL/M has a simpler type system than C, for example very
little in the way of promotion rules. It makes for fairly efficient
code on a pure 8-bit processor without a heavyweight optimizer. And
the language is simple enough that the compiler can fit in memory and
be reasonably fast.

Andrew.

Re: PL/M

<77a1b847-5807-4e8d-a068-aa727025bc2an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26510&group=comp.lang.c#26510

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:8647:0:b0:762:42ca:919e with SMTP id i68-20020a378647000000b0076242ca919emr11499qkd.9.1690052451663;
Sat, 22 Jul 2023 12:00:51 -0700 (PDT)
X-Received: by 2002:a05:6870:771b:b0:1bb:4d41:e92e with SMTP id
dw27-20020a056870771b00b001bb4d41e92emr922876oab.2.1690052451475; Sat, 22 Jul
2023 12:00:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 22 Jul 2023 12:00:51 -0700 (PDT)
In-Reply-To: <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=69.231.86.239; posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 69.231.86.239
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <77a1b847-5807-4e8d-a068-aa727025bc2an@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Sat, 22 Jul 2023 19:00:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3288
 by: Ed Prochak - Sat, 22 Jul 2023 19:00 UTC

On Saturday, July 22, 2023 at 9:33:20 AM UTC-4, a...@littlepinkcloud.invalid wrote:
> Paul Edwards <muta...@gmail.com> wrote:
> > On Friday, July 21, 2023 at 4:48:38?AM UTC+8, Ed Prochak wrote:
> >
> >> PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was
> >> optimized for the Intel Processors, especially the 8080 family. You
> >> had much better control over memory usage as the sizes of Integers,
> >> pointers and character variables were well defined.
> >
> > Surely that "issue" in C is easily mitigated by having a "flavor" of
> > C (if you need to go that far) that has very well-defined 16-bit
> > addresses and 8-bit unsigned chars?
> Not entirely. PL/M has a simpler type system than C, for example very
> little in the way of promotion rules. It makes for fairly efficient
> code on a pure 8-bit processor without a heavyweight optimizer. And
> the language is simple enough that the compiler can fit in memory and
> be reasonably fast.
>
> Andrew.

Andrew, Yes "reasonably fast"! On the INTEL blue boxes where we ran the PL/M compiler
there was dual 8inch floppy drives. I don't remember how much RAM. The compile of
that debugger took close to an hour to produce just the load image. I had to run a
second pass to produce the assembler listing because you could not fit both on the
output floppy! (Later a 5 meg hard drive was added and the build time for the
debugger went from over an hour to about 5 minutes to produce both image and listing!)

When we did get the C cross compiler, it ran on a DEC VAX!

We did take advantage of C's portability on the next project, debugging the logic
of our embedded software on the VAX before compiling them for the target 8086 boards.
So Paul, don't get me wrong. In the end I liked C and have used it a LOT.

Enjoy
Ed

Re: PL/M

<u9hkua$3v9vb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26522&group=comp.lang.c#26522

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Sat, 22 Jul 2023 23:24:11 +0100
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <u9hkua$3v9vb$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me>
<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<77a1b847-5807-4e8d-a068-aa727025bc2an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 22 Jul 2023 22:24:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1ff3cd75a92dd528a6e3b811369f9b54";
logging-data="4171755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YLYOjpVKHkahi4ASEteZGgQl5gH03CPs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:Y2FmF7Vw4vitoJxyBGm+5WP9Z5I=
In-Reply-To: <77a1b847-5807-4e8d-a068-aa727025bc2an@googlegroups.com>
 by: Bart - Sat, 22 Jul 2023 22:24 UTC

On 22/07/2023 20:00, Ed Prochak wrote:
> On Saturday, July 22, 2023 at 9:33:20 AM UTC-4,
a...@littlepinkcloud.invalid wrote:
>> Paul Edwards <muta...@gmail.com> wrote:
>>> On Friday, July 21, 2023 at 4:48:38?AM UTC+8, Ed Prochak wrote:
>>>
>>>> PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was
>>>> optimized for the Intel Processors, especially the 8080 family. You
>>>> had much better control over memory usage as the sizes of Integers,
>>>> pointers and character variables were well defined.
>>>
>>> Surely that "issue" in C is easily mitigated by having a "flavor" of
>>> C (if you need to go that far) that has very well-defined 16-bit
>>> addresses and 8-bit unsigned chars?
>> Not entirely. PL/M has a simpler type system than C, for example very
>> little in the way of promotion rules. It makes for fairly efficient
>> code on a pure 8-bit processor without a heavyweight optimizer. And
>> the language is simple enough that the compiler can fit in memory and
>> be reasonably fast.
>>
>> Andrew.
>
> Andrew, Yes "reasonably fast"! On the INTEL blue boxes where we ran
the PL/M compiler
> there was dual 8inch floppy drives. I don't remember how much RAM.
The compile of
> that debugger took close to an hour to produce just the load image.

That sounds extremely slow even for 8080 running on floppies (what was
the size of the image produced?).

Was this 'blue box' an emulator for 8080 running on an 8080? That seems
to be the gist of what is written about this 'Intel MDS 80'. If so that
might explain the speed, although not why it was necessary to use such
an emulator.

I ran my own compiler directly on Z80, at perhaps double the clock
speed, and using 5" floppies that could have been double the capacity of
8" ones (320KB vs 160KB or something).

It only took seconds to build a program. The limiting factor was the
time to read files off disk, at 20KB/sec or some such value, but the
largest program that could be loaded was only 60KB anyway.

> I had to run a
> second pass to produce the assembler listing because you could not
fit both on the
> output floppy!

I've heard of such listings but it's not something I ever bothered with.
It sounds a bit of a luxury on such devices.

Re: PL/M

<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26532&group=comp.lang.c#26532

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a20:b0:403:a627:8b79 with SMTP id f32-20020a05622a1a2000b00403a6278b79mr15823qtb.13.1690070378334; Sat, 22 Jul 2023 16:59:38 -0700 (PDT)
X-Received: by 2002:a05:6808:1292:b0:3a1:dd24:5ac6 with SMTP id a18-20020a056808129200b003a1dd245ac6mr11779117oiw.11.1690070377984; Sat, 22 Jul 2023 16:59:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.11.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 22 Jul 2023 16:59:37 -0700 (PDT)
In-Reply-To: <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.115; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.115
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com> <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com> <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Sat, 22 Jul 2023 23:59:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: Paul Edwards - Sat, 22 Jul 2023 23:59 UTC

On Saturday, July 22, 2023 at 9:33:20 PM UTC+8, a...@littlepinkcloud.invalid wrote:

> >> PL/M was an Intel variation of PL/1 from IBM. PL/M toolset was
> >> optimized for the Intel Processors, especially the 8080 family. You
> >> had much better control over memory usage as the sizes of Integers,
> >> pointers and character variables were well defined.
> >
> > Surely that "issue" in C is easily mitigated by having a "flavor" of
> > C (if you need to go that far) that has very well-defined 16-bit
> > addresses and 8-bit unsigned chars?

> Not entirely. PL/M has a simpler type system than C, for example very
> little in the way of promotion rules. It makes for fairly efficient
> code on a pure 8-bit processor without a heavyweight optimizer. And
> the language is simple enough that the compiler can fit in memory and
> be reasonably fast.

Can a subset of C be used to match both of those things?

Or a slight variant?

I'm talking about with the same effort that was put into PL/M
at the time (1970s) - ie NOT relying on modern heavyweight
optimization of C from 2023.

Basically if the language C90 had existed in say 1950, and at
the time people started writing PL/M they instead were inspired
by C90=C50, would C have been perfectly fine for the eventual
task of writing the CPM-80 operating system?

Thanks. Paul.

Re: PL/M

<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26610&group=comp.lang.c#26610

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.22.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 24 Jul 2023 14:07:27 +0000
Sender: Andrew Haley <aph@zarquon.pink>
From: aph...@littlepinkcloud.invalid
Subject: Re: PL/M
Newsgroups: comp.lang.c
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com> <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com> <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/4.18.0-477.13.1.el8_8.x86_64 (x86_64))
Message-ID: <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
Date: Mon, 24 Jul 2023 14:07:27 +0000
Lines: 33
X-Trace: sv3-6Woekq6yxxtxpz2otsHwkGEGMlZxOf2eKgCQ95zjENX4ae6k1GzZCw/Fu+XClGtO96FTn7Wl0gZRGdA!/UCf/sRAHq6SBFYalOcDye+SLwxHci1n2EyPqOvGU3wlmoYuVN9gYSuBQwkG48akwU3RxDnTlo+z!ZXvoZPqXK4o=
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: aph...@littlepinkcloud.invalid - Mon, 24 Jul 2023 14:07 UTC

Paul Edwards <mutazilah@gmail.com> wrote:
> On Saturday, July 22, 2023 at 9:33:20?PM UTC+8, a...@littlepinkcloud.invalid wrote:
>> PL/M has a simpler type system than C, for example very
>> little in the way of promotion rules. It makes for fairly efficient
>> code on a pure 8-bit processor without a heavyweight optimizer. And
>> the language is simple enough that the compiler can fit in memory and
>> be reasonably fast.
>
> Can a subset of C be used to match both of those things?
>
> Or a slight variant?

I guess so, sure, if you ditch the integer promotion rules and end up
with something that corresponds more-or-less to the PL/M feature set
but with C's syntax.

> I'm talking about with the same effort that was put into PL/M
> at the time (1970s) - ie NOT relying on modern heavyweight
> optimization of C from 2023.
>
> Basically if the language C90 had existed in say 1950,

Be realistic: 1960. The first functioning stored-program computers
became available around 1950.

> and at the time people started writing PL/M they instead were
> inspired by C90=C50, would C have been perfectly fine for the
> eventual task of writing the CPM-80 operating system?

Well, yes, if by "C" you mean a sort of Tiny C subset that corresponds
to PL/M.

Andrew.

Re: PL/M

<u9m327$n03m$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26615&group=comp.lang.c#26615

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Mon, 24 Jul 2023 15:49:45 +0100
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <u9m327$n03m$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me>
<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 24 Jul 2023 14:49:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bc713edb1ff551516d7c9b4e592eb73a";
logging-data="753782"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JlxLKQt5ZncVwKw0NUpzlRfciJOs3LNY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:a731gqmL+48uvmHZD6/RPlY7yOQ=
In-Reply-To: <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
 by: Bart - Mon, 24 Jul 2023 14:49 UTC

On 24/07/2023 15:07, aph@littlepinkcloud.invalid wrote:
> Paul Edwards <mutazilah@gmail.com> wrote:
>> On Saturday, July 22, 2023 at 9:33:20?PM UTC+8, a...@littlepinkcloud.invalid wrote:
>>> PL/M has a simpler type system than C, for example very
>>> little in the way of promotion rules. It makes for fairly efficient
>>> code on a pure 8-bit processor without a heavyweight optimizer. And
>>> the language is simple enough that the compiler can fit in memory and
>>> be reasonably fast.
>>
>> Can a subset of C be used to match both of those things?
>>
>> Or a slight variant?
>
> I guess so, sure, if you ditch the integer promotion rules and end up
> with something that corresponds more-or-less to the PL/M feature set
> but with C's syntax.
>
>> I'm talking about with the same effort that was put into PL/M
>> at the time (1970s) - ie NOT relying on modern heavyweight
>> optimization of C from 2023.
>>
>> Basically if the language C90 had existed in say 1950,
>
> Be realistic: 1960. The first functioning stored-program computers
> became available around 1950.
>
>> and at the time people started writing PL/M they instead were
>> inspired by C90=C50, would C have been perfectly fine for the
>> eventual task of writing the CPM-80 operating system?
>
> Well, yes, if by "C" you mean a sort of Tiny C subset that corresponds
> to PL/M.

Tiny C actually implements a substantial subset of C99. I think only
Complex support is missing (or that I'm aware of).

My own C compiler does a smaller subset (leaving out also VLAs,
designated initialisers, compound literals among others), but even that
implements a massively bigger language that than used by PL/M.

There will likely be many toy 'C' compilers at that level (though
probably not that generate code for 8080).

Personally I would just keep that PL/M code as PL/M.

However, I've long lost track of what the OP is trying to achieve. Is
the aim to have a compiler that /runs on/ the 8080? The PL/M sources I
saw were written in Fortran, and presumably were for a cross-compiler.

Re: PL/M

<28153469-ad65-42dc-94dc-d5c90ed6c1b0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26661&group=comp.lang.c#26661

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:4b2b:0:b0:635:e3ae:e0a0 with SMTP id s11-20020ad44b2b000000b00635e3aee0a0mr1414qvw.9.1690330352246; Tue, 25 Jul 2023 17:12:32 -0700 (PDT)
X-Received: by 2002:a05:6808:1993:b0:3a4:26e5:8b24 with SMTP id bj19-20020a056808199300b003a426e58b24mr1106449oib.9.1690330352034; Tue, 25 Jul 2023 17:12:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.14.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 25 Jul 2023 17:12:31 -0700 (PDT)
In-Reply-To: <u9m327$n03m$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com> <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com> <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com> <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <u9m327$n03m$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28153469-ad65-42dc-94dc-d5c90ed6c1b0n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 26 Jul 2023 00:12:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 32
 by: Paul Edwards - Wed, 26 Jul 2023 00:12 UTC

On Monday, July 24, 2023 at 10:49:57 PM UTC+8, Bart wrote:

> There will likely be many toy 'C' compilers at that level (though
> probably not that generate code for 8080).
>
> Personally I would just keep that PL/M code as PL/M.

I'm not attempting to change the existing PL/M code.
I want to compete with it, in C, on a level playing field.

> However, I've long lost track of what the OP is trying to achieve. Is
> the aim to have a compiler that /runs on/ the 8080?

Not necessarily. CP/M was written via cross-compilation,
so I am happy to do that too.

But I know there are C compilers that run on the 8080,
one of them (BDS C) was actually released to the
public domain. It's written in 8080 assembler.

So if I can run the compiler on the 8080, cool, but I
believe you have to make compromises to fit into
64k. Even SubC has exceeded 64k of code in small
memory model 8086 and hasn't even reached C90
yet. Nevermind data.

And I don't want to make compromises to the source
code of the C compiler due to ridiculous memory
constraints.

So cross-compiling is probably the only option.

BFN. Paul.

Re: PL/M

<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26662&group=comp.lang.c#26662

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:57ad:0:b0:635:49d7:544f with SMTP id g13-20020ad457ad000000b0063549d7544fmr1680qvx.4.1690331513138;
Tue, 25 Jul 2023 17:31:53 -0700 (PDT)
X-Received: by 2002:a05:6830:199:b0:6b8:92ea:23c4 with SMTP id
q25-20020a056830019900b006b892ea23c4mr1004182ota.4.1690331512806; Tue, 25 Jul
2023 17:31:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 25 Jul 2023 17:31:52 -0700 (PDT)
In-Reply-To: <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 26 Jul 2023 00:31:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 92
 by: Paul Edwards - Wed, 26 Jul 2023 00:31 UTC

On Monday, July 24, 2023 at 10:07:50 PM UTC+8, a...@littlepinkcloud..invalid wrote:

> >> PL/M has a simpler type system than C, for example very
> >> little in the way of promotion rules. It makes for fairly efficient
> >> code on a pure 8-bit processor without a heavyweight optimizer. And
> >> the language is simple enough that the compiler can fit in memory and
> >> be reasonably fast.
> >
> > Can a subset of C be used to match both of those things?
> >
> > Or a slight variant?

> I guess so, sure, if you ditch the integer promotion rules and end up
> with something that corresponds more-or-less to the PL/M feature set
> but with C's syntax.

Ok, I've been programming in C for about 35 years, but
some aspects I have never had to delve into too deeply,
and promotion rules is one of them.

Is this something you could elaborate or is it too much work?

Basically, what is standard C doing, and what does a C
variant need to do to compete with PL/M? (with regard
to promotion rule changes)

> > I'm talking about with the same effort that was put into PL/M
> > at the time (1970s) - ie NOT relying on modern heavyweight
> > optimization of C from 2023.
> >
> > Basically if the language C90 had existed in say 1950,

> Be realistic: 1960. The first functioning stored-program computers
> became available around 1950.

Ok.

> > and at the time people started writing PL/M they instead were
> > inspired by C90=C50, would C have been perfectly fine for the
> > eventual task of writing the CPM-80 operating system?

> Well, yes, if by "C" you mean a sort of Tiny C subset that corresponds
> to PL/M.

Ok, great - this sounds exactly what I'm after.

And in fact, C evolved through BPCL and B too.

Starting in 1960, I would like a C90-inspired language that will
cover the development of all OSes on all platforms. I know it
is possible to write a mainframe OS in C90 (that's what I did
with z/PDOS). With some assembler routines to be called from
C of course. So IBM could have used C instead of PL/S and
assembler on the S/360 line.

But for the 8080, apparently type promotion interfered with
writing an OS. And maybe the same issue happened with
writing QDOS/86DOS/MSDOS 1.0 for the 8086?

So I need a suitable subset of C. Note that the Sub C C
compiler has a subset of C too - but that's due to it taking
a long time to find someone to write the necessary code.

And SubC has an evolution too - the older versions don't
have struct, and a version with struct has been written
without using struct. So there are a series of stepping
stones. And it only supports char (which is unsigned)
and int. So maybe it is already the PL/M equivalent, and
exactly SubC was needed to write a CP/M equivalent?

I don't like the requirement of C90 for "long" to be 32-bits
either. That seems onerous for an 8-bit system to me.

Are you aware of Sector C? A C subset that is less than
512 bytes of 8086 assembler. I converted that to C and
called it Multisector C, and targeted the mainframe too.

I don't know if it is technically possible to start with
Sector C/Multisector C and then - purely writing in
valid C90 code (subset) - aside from things that need to
be in assembler - you can eventually produce a full C90
compiler. ie a series of stepping stones.

And I don't know if the PL/M equivalent would be part
of that stepping stone process, or a side-track.

Basically I'm trying to rationalize my use of C. Sort of
like I know English, but need to adjust to Glaswegian
accent. Or Indian accent.

Thanks. Paul.

Re: PL/M

<56a05b3b-c24d-444f-9e2a-a3241e7cd3dfn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26664&group=comp.lang.c#26664

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:55cd:0:b0:63c:f38d:e0ce with SMTP id bt13-20020ad455cd000000b0063cf38de0cemr5224qvb.1.1690340528998;
Tue, 25 Jul 2023 20:02:08 -0700 (PDT)
X-Received: by 2002:a05:6808:30a2:b0:3a0:44fb:53c2 with SMTP id
bl34-20020a05680830a200b003a044fb53c2mr2117269oib.0.1690340528689; Tue, 25
Jul 2023 20:02:08 -0700 (PDT)
Path: i2pn2.org!rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 25 Jul 2023 20:02:08 -0700 (PDT)
In-Reply-To: <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <56a05b3b-c24d-444f-9e2a-a3241e7cd3dfn@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 26 Jul 2023 03:02:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2446
 by: Paul Edwards - Wed, 26 Jul 2023 03:02 UTC

On Wednesday, July 26, 2023 at 8:32:02 AM UTC+8, Paul Edwards wrote:

> Basically I'm trying to rationalize my use of C. Sort of
> like I know English, but need to adjust to Glaswegian
> accent. Or Indian accent.

There was something similar attempted with English.
They wanted an "international business English" or
something. You were allowed to say "close" to close a
tap, but you weren't allowed to say "get close to the
object".

It didn't work, because natives could never remember
which words they weren't supposed to use.

But in this case the compiler will quickly inform you
which syntax is not supported by a particular dialect
or subset of C for "small memory use" (or whatever
this is called - primitive compiler technology use?).

BFN. Paul.

Re: PL/M

<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26681&group=comp.lang.c#26681

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a08:b0:403:acd3:eb2f with SMTP id f8-20020a05622a1a0800b00403acd3eb2fmr6166qtb.4.1690382107084;
Wed, 26 Jul 2023 07:35:07 -0700 (PDT)
X-Received: by 2002:a05:6871:6b9e:b0:1bb:78b4:2e6e with SMTP id
zh30-20020a0568716b9e00b001bb78b42e6emr3511959oab.7.1690382106784; Wed, 26
Jul 2023 07:35:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 26 Jul 2023 07:35:06 -0700 (PDT)
In-Reply-To: <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:5f82:5000:a5aa:367e:fa1b:8227;
posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 2600:1700:5f82:5000:a5aa:367e:fa1b:8227
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Wed, 26 Jul 2023 14:35:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Ed Prochak - Wed, 26 Jul 2023 14:35 UTC

On Tuesday, July 25, 2023 at 8:32:02 PM UTC-4, Paul Edwards wrote:
> On Monday, July 24, 2023 at 10:07:50 PM UTC+8, a...@littlepinkcloud.invalid wrote:
>
> > >> PL/M has a simpler type system than C, for example very
> > >> little in the way of promotion rules. It makes for fairly efficient
> > >> code on a pure 8-bit processor without a heavyweight optimizer. And
> > >> the language is simple enough that the compiler can fit in memory and
> > >> be reasonably fast.
> > >
> > > Can a subset of C be used to match both of those things?
> > >
> > > Or a slight variant?
>
> > I guess so, sure, if you ditch the integer promotion rules and end up
> > with something that corresponds more-or-less to the PL/M feature set
> > but with C's syntax.
> Ok, I've been programming in C for about 35 years, but
> some aspects I have never had to delve into too deeply,
> and promotion rules is one of them.
>
> Is this something you could elaborate or is it too much work?
>
> Basically, what is standard C doing, and what does a C
> variant need to do to compete with PL/M? (with regard
> to promotion rule changes)

The versions of C in the mid 1980's competed with PL/M
and eventually won. As I mentioned, where I worked, PL/M
was dropped for application development. It did require a
cross compiler running on a larger machine (VAX), but gave
an advantage of debugging the logic of the c programs on
the VAX.

> > > I'm talking about with the same effort that was put into PL/M
> > > at the time (1970s) - ie NOT relying on modern heavyweight
> > > optimization of C from 2023.
> > >
> > > Basically if the language C90 had existed in say 1950,
>
> > Be realistic: 1960. The first functioning stored-program computers
> > became available around 1950.
> Ok.
> > > and at the time people started writing PL/M they instead were
> > > inspired by C90=C50, would C have been perfectly fine for the
> > > eventual task of writing the CPM-80 operating system?

Yes C would have been fine for CP/M. UNIX was eventually
written in C.

Ignoring the differences, both languages are Turing complete,
so any program that can be written with PL/M can be written
in C and vice versa.

>
> > Well, yes, if by "C" you mean a sort of Tiny C subset that corresponds
> > to PL/M.
> Ok, great - this sounds exactly what I'm after.
>
> And in fact, C evolved through BPCL and B too.
>
> Starting in 1960, I would like a C90-inspired language that will
> cover the development of all OSes on all platforms. I know it
> is possible to write a mainframe OS in C90 (that's what I did
> with z/PDOS). With some assembler routines to be called from
> C of course. So IBM could have used C instead of PL/S and
> assembler on the S/360 line.

Why would they? PL/S had features that IBM wanted that made the
development easier. This "use C for any OS" mantra is nice, but
not useful. There are still parts that have to be written in assembly.
Other languages like PL/S provide different features that may
be more useful for the specific goals of a specific OS.

So I think the bottom line answer to your question is:
Sure, CP/M can be written in C. And if you want to
use C90 or better, go for it.

Ed

Re: PL/M

<2555e5b6-926d-45be-861f-74228930d19dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26683&group=comp.lang.c#26683

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a98:b0:404:132c:e7da with SMTP id s24-20020a05622a1a9800b00404132ce7damr12276qtc.5.1690382979353;
Wed, 26 Jul 2023 07:49:39 -0700 (PDT)
X-Received: by 2002:a05:6808:2102:b0:3a3:89a2:50a5 with SMTP id
r2-20020a056808210200b003a389a250a5mr5366538oiw.10.1690382978993; Wed, 26 Jul
2023 07:49:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 26 Jul 2023 07:49:38 -0700 (PDT)
In-Reply-To: <56a05b3b-c24d-444f-9e2a-a3241e7cd3dfn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:5f82:5000:a5aa:367e:fa1b:8227;
posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 2600:1700:5f82:5000:a5aa:367e:fa1b:8227
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<56a05b3b-c24d-444f-9e2a-a3241e7cd3dfn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2555e5b6-926d-45be-861f-74228930d19dn@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Wed, 26 Jul 2023 14:49:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Ed Prochak - Wed, 26 Jul 2023 14:49 UTC

On Tuesday, July 25, 2023 at 11:02:18 PM UTC-4, Paul Edwards wrote:
> On Wednesday, July 26, 2023 at 8:32:02 AM UTC+8, Paul Edwards wrote:
>
> > Basically I'm trying to rationalize my use of C. Sort of
> > like I know English, but need to adjust to Glaswegian
> > accent. Or Indian accent.
> There was something similar attempted with English.
> They wanted an "international business English" or
> something. You were allowed to say "close" to close a
> tap, but you weren't allowed to say "get close to the
> object".
>
> It didn't work, because natives could never remember
> which words they weren't supposed to use.
>
> But in this case the compiler will quickly inform you
> which syntax is not supported by a particular dialect
> or subset of C for "small memory use" (or whatever
> this is called - primitive compiler technology use?).
>
> BFN. Paul.

Except watch out, those error messages can quickly
be confusing.

Here's an example from my experience:
Source code has structures but no code of the style:
structureB = structureA;

yet the C cross compiler produces the error message:
"Structure assignments not available."

After much consternation and discussions with the
compiler writers, we learned the error referred to a
function call:
funcA(..., structureA, ...);
which should have been:
funcA(..., &structureA, ...);

(This was just a chance for me to vent one of my
pet peeves that error messages are often written
from the view of the developer, not of the end user.
But it is the end user that has to understand them!)

TTFN
Ed

Re: PL/M

<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26687&group=comp.lang.c#26687

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:57ad:0:b0:635:49d7:544f with SMTP id g13-20020ad457ad000000b0063549d7544fmr6877qvx.4.1690384507863;
Wed, 26 Jul 2023 08:15:07 -0700 (PDT)
X-Received: by 2002:a67:d99e:0:b0:443:6601:d8fb with SMTP id
u30-20020a67d99e000000b004436601d8fbmr16569vsj.2.1690384506883; Wed, 26 Jul
2023 08:15:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 26 Jul 2023 08:15:06 -0700 (PDT)
In-Reply-To: <b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.55; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.55
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 26 Jul 2023 15:15:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5379
 by: Paul Edwards - Wed, 26 Jul 2023 15:15 UTC

On Wednesday, July 26, 2023 at 10:35:15 PM UTC+8, Ed Prochak wrote:

> > Basically, what is standard C doing, and what does a C
> > variant need to do to compete with PL/M? (with regard
> > to promotion rule changes)

> The versions of C in the mid 1980's competed with PL/M
> and eventually won.

Yeah - but I'm trying to compete in the 1970s on 8-bit machines.

I've never attempted to program in C on an 8-bit machine.
I wouldn't have thought that the short&int = 16-bit minimum
would be suitable.

> > > > and at the time people started writing PL/M they instead were
> > > > inspired by C90=C50, would C have been perfectly fine for the
> > > > eventual task of writing the CPM-80 operating system?

> Yes C would have been fine for CP/M. UNIX was eventually
> written in C.

Not 8-bit I think.

> Ignoring the differences, both languages are Turing complete,
> so any program that can be written with PL/M can be written
> in C and vice versa.

Assuming sufficient memory. You can probably write in
Cobol too, but not write CP/M-80 in Cobol.

> > Starting in 1960, I would like a C90-inspired language that will
> > cover the development of all OSes on all platforms. I know it
> > is possible to write a mainframe OS in C90 (that's what I did
> > with z/PDOS). With some assembler routines to be called from
> > C of course. So IBM could have used C instead of PL/S and
> > assembler on the S/360 line.

> Why would they? PL/S had features that IBM wanted that made the
> development easier.

Ok sure - if they have the ability to spend a lot of work writing
the PL/S compiler, and runtime resources too, then fine, I'm
sure there are productivity features you can add. Maybe even
call it C++, who knows.

I'm more interested in the fact that a lot of it was in assembler,
not PL/S, and I don't think it needed to be. E.g. the assembler
(IFOX) itself is written in assembler. I think "SORT" too - and
it's massive.

> This "use C for any OS" mantra is nice, but
> not useful. There are still parts that have to be written in assembly.

I'm not disputing that there are parts that there is no choice
but to write in assembly.

My discussion is only about the parts where you have a
choice.

I don't mind if it is slower to write in C than PL/S - and
this would be me writing my own OS - I don't control IBM.

I want to (belatedly) compete with IBM, and Microsoft,
and now DRI on the 8080. I actually went into writing
PDOS/86 blind, and z/PDOS blind too. And although
I have programmed in assembler on a 6502, I've
never programmed on the 8080 at all, or any 8-bit
machine in C, and so I'm still blind there.

Up until recently I thought you needed to program in
assembler on an 8-bit machine if you wanted to write
an OS, for space reasons. And then I found that the
first OS of note for micros wasn't even written in
assembler! Again - I wasn't aware this was possible.

PDOS/86 takes up an entire 360k floppy disk. Just a
minimal OS. There is no fat to cut out. How you can
fit that into 64k and still leave room for apps - well,
beats me. Especially if C90 forces int to 16 bits. And
can you even code sensibly if ints were 8 bits (which
is not even allowed)?

No idea - like I said, I'm starting this blind.

> So I think the bottom line answer to your question is:
> Sure, CP/M can be written in C. And if you want to
> use C90 or better, go for it.

Ok - thanks. I guess what I can do is start with the CP/M
API, since that's what I know is possible, write an OS in C
and run it through an 8080 compiler and see what happens.
Again - starting blind - I'm not sure what to expect.

BFN. Paul.

Re: PL/M

<WUawM.202897$TPw2.194668@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26689&group=comp.lang.c#26689

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: PL/M
Newsgroups: comp.lang.c
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com> <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com> <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com> <b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
Lines: 16
Message-ID: <WUawM.202897$TPw2.194668@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 26 Jul 2023 15:24:38 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 26 Jul 2023 15:24:38 GMT
X-Received-Bytes: 1584
 by: Scott Lurndal - Wed, 26 Jul 2023 15:24 UTC

Paul Edwards <mutazilah@gmail.com> writes:
>On Wednesday, July 26, 2023 at 10:35:15=E2=80=AFPM UTC+8, Ed Prochak wrote:

>> Ignoring the differences, both languages are Turing complete,=20
>> so any program that can be written with PL/M can be written=20
>> in C and vice versa.
>
>Assuming sufficient memory. You can probably write in
>Cobol too, but not write CP/M-80 in Cobol.

Actually, there is no reason that CP/M-80 cannot be written
in COBOL. I worked with a COBOL compiler that allowed
in-line assembler several decades ago, before CP/M even existed.

Re: PL/M

<u9ref6$1h2ik$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26691&group=comp.lang.c#26691

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Wed, 26 Jul 2023 15:35:03 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Lines: 30
Message-ID: <u9ref6$1h2ik$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<WUawM.202897$TPw2.194668@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jul 2023 15:35:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4f4fdb937d31d90ca6ab18c4ae36868a";
logging-data="1608276"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/F03eO13dUQIPlDs2Gn4c9AHfvVm2chRo="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:13HXVWnlsrXUl1PDZ+r/O2x3T4I=
 by: Lew Pitcher - Wed, 26 Jul 2023 15:35 UTC

On Wed, 26 Jul 2023 15:24:38 +0000, Scott Lurndal wrote:

> Paul Edwards <mutazilah@gmail.com> writes:
>>On Wednesday, July 26, 2023 at 10:35:15=E2=80=AFPM UTC+8, Ed Prochak wrote:
>
>>> Ignoring the differences, both languages are Turing complete,=20
>>> so any program that can be written with PL/M can be written=20
>>> in C and vice versa.
>>
>>Assuming sufficient memory. You can probably write in
>>Cobol too, but not write CP/M-80 in Cobol.
>
> Actually, there is no reason that CP/M-80 cannot be written
> in COBOL. I worked with a COBOL compiler that allowed
> in-line assembler several decades ago, before CP/M even existed.

Two factoids, for what they are worth...

First, long ago, I worked on a communications protocol package entirely
written in COBOL. While COBOL may be wordy to write, it /can/
perform complex low-level functions in (depending on the compiler)
a reduced executable footprint.

Second, the GNU COBOL compiler translates COBOL into C, then invokes
the GNU C compiler to generate the executable code. So, for at least
one COBOL compiler, the end result /is/ C code.

--
Lew Pitcher
"In Skills We Trust"

Re: PL/M

<klSGHWOWaGGngy0TW@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26695&group=comp.lang.c#26695

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Wed, 26 Jul 2023 16:21:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <klSGHWOWaGGngy0TW@bongo-ra.co>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com> <4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com> <D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<56a05b3b-c24d-444f-9e2a-a3241e7cd3dfn@googlegroups.com> <2555e5b6-926d-45be-861f-74228930d19dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jul 2023 16:21:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b77f4ba695e3df609b663904ee91e3ba";
logging-data="1630718"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fyBwUpXBLZjcsDfWp3Yr4"
Cancel-Lock: sha1:WyTyjhHpsfEF4Ot26ZEt/uzDiVE=
X-Server-Commands: nowebcancel
In-Reply-To: <2555e5b6-926d-45be-861f-74228930d19dn@googlegroups.com>
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Wed, 26 Jul 2023 16:21 UTC

On Wed, 26 Jul 2023 07:49:38 -0700 (PDT)
Ed Prochak <edprochak@gmail.com> wrote:
> Except watch out, those error messages can quickly
> be confusing.
>
> Here's an example from my experience:
> Source code has structures but no code of the style:
> structureB = structureA;
>
> yet the C cross compiler produces the error message:
> "Structure assignments not available."
>
> After much consternation and discussions with the
> compiler writers, we learned the error referred to a
> function call:
> funcA(..., structureA, ...);
> which should have been:
> funcA(..., &structureA, ...);

Didn't the error message mention line number ?

> (This was just a chance for me to vent one of my
> pet peeves that error messages are often written
> from the view of the developer, not of the end user.
> But it is the end user that has to understand them!)

Re: PL/M

<877cqmjx2g.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26700&group=comp.lang.c#26700

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Wed, 26 Jul 2023 20:24:07 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <877cqmjx2g.fsf@bsb.me.uk>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me>
<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="b5cdfce93621456808a6ca99a8a551a4";
logging-data="1667943"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/l/px9ph+UKV/OshIYSKJLTHQV0ZGezVM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:q6pJBp5SrNXuZ+3VCvF+IZ1qy+M=
sha1:C43cT3sWyfrpwAj8aKe658F8tWg=
X-BSB-Auth: 1.a379f2cfcc7ff380f192.20230726202407BST.877cqmjx2g.fsf@bsb.me.uk
 by: Ben Bacarisse - Wed, 26 Jul 2023 19:24 UTC

Paul Edwards <mutazilah@gmail.com> writes:

> And in fact, C evolved through BPCL and B too.

BCPL: mid 1960s, first published 1967. The date of B is a little later,
maybe 1970.

> Starting in 1960, I would like a C90-inspired language that will
> cover the development of all OSes on all platforms. I know it
> is possible to write a mainframe OS in C90 (that's what I did
> with z/PDOS). With some assembler routines to be called from
> C of course. So IBM could have used C instead of PL/S and
> assembler on the S/360 line.

I'm not sure what "starting in 1960" refers to. It can't refer to BCPL
or B and certainly not C. C started out as "new B" in about 1971 but
was only really something we'd call C by about 1974.

The 360 series was developed in the early 1960s (first sold in 1965) so
so "IBM could have used C" is an odd thing to say. Some later versions
in C (like C90) were technically suitable, but the job had already been
done.

--
Ben.

Re: PL/M

<78e1df03-09a2-44ed-b7fb-654563a816b2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26709&group=comp.lang.c#26709

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:58ab:0:b0:635:dddc:1779 with SMTP id ea11-20020ad458ab000000b00635dddc1779mr10851qvb.7.1690415423877;
Wed, 26 Jul 2023 16:50:23 -0700 (PDT)
X-Received: by 2002:a05:6808:23c5:b0:3a3:8c81:a86f with SMTP id
bq5-20020a05680823c500b003a38c81a86fmr2350171oib.7.1690415423599; Wed, 26 Jul
2023 16:50:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 26 Jul 2023 16:50:23 -0700 (PDT)
In-Reply-To: <877cqmjx2g.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.175; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.175
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me> <40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com> <54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com> <84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com> <769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<877cqmjx2g.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <78e1df03-09a2-44ed-b7fb-654563a816b2n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Wed, 26 Jul 2023 23:50:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 60
 by: Paul Edwards - Wed, 26 Jul 2023 23:50 UTC

On Thursday, July 27, 2023 at 3:24:24 AM UTC+8, Ben Bacarisse wrote:

> I'm not sure what "starting in 1960" refers to. It can't refer to BCPL
> or B and certainly not C. C started out as "new B" in about 1971 but
> was only really something we'd call C by about 1974.
>
> The 360 series was developed in the early 1960s (first sold in 1965) so
> so "IBM could have used C" is an odd thing to say. Some later versions
> in C (like C90) were technically suitable, but the job had already been
> done.

Yeah, it's more a question of "if we had our time again".

I have basically spent my life probing systems from the safety
of a C90 compiler. Forcing the mountain to come to Mohammad
I guess.

And with an underlying assumption that the C90 people knew
what they were doing. In fact, ISO actually delayed ANSI's
release by a year or something because they were going to
reject it otherwise. ANSI added a locale system and that was
apparently good enough for it to be adopted unchanged
(although I have no idea why they felt the need to change
the section numbers).

Anyway, now that I have a V20 chip in a new computer (a
Book 8088), I can now probe the 8080. I've been vlogging
about that at the bottom of http://pdos.org

And I'm wondering how on earth to fit 300k of code into 64k.

I could potentially eliminate the C library, but the main source
file is:

2023-07-27 07:39 62,401 pdos.obj

That's 7400 lines of C code. Built with Open Watcom. Admittedly
I am using huge memory model.

Small memory model gives:

2023-07-27 07:42 45,487 pdos.obj

In actual fact I have more-or-less given up on the 8086 as it
really only gives enough memory for PDOS/86 to load itself.

I can probably load a CP/M-80 emulator too.

But otherwise I had decided that I needed an 80286 with
2 MB of memory to do anything.

Visual C++ 1.52C gives:

2023-07-27 07:47 52,501 pdos.obj
and
2023-07-27 07:48 41,752 pdos.obj

BFN. Paul.

Re: PL/M

<87h6pqi5oz.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=26711&group=comp.lang.c#26711

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Thu, 27 Jul 2023 01:00:44 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <87h6pqi5oz.fsf@bsb.me.uk>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<u99vta$2ck7s$1@dont-email.me>
<40a96aa9-9a8d-487e-a361-18428e543c69n@googlegroups.com>
<af6800ed-8ca2-42ad-a9a6-ecbff34f8de3n@googlegroups.com>
<54eed49f-2fc3-48c4-a399-a363735661ddn@googlegroups.com>
<4O2dnadSTZcURyb5nZ2dnZfqn_qdnZ2d@supernews.com>
<84f0b296-5b42-44bc-ae57-c710fce94b66n@googlegroups.com>
<D7WcnaPmNrACGCP5nZ2dnZfqn_qdnZ2d@supernews.com>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<877cqmjx2g.fsf@bsb.me.uk>
<78e1df03-09a2-44ed-b7fb-654563a816b2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="5a5e343133fc3f20981bd9b482679604";
logging-data="1724826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yX9wiZu2ihOiZOe/faYZtHVvTfVRRB7Q="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:3PwqABm0hYSEN78XCJxwdDzJZSU=
sha1:H+2ld2F8CluMssrn8IBU1mfgmjE=
X-BSB-Auth: 1.0caa0991db2584b25b90.20230727010044BST.87h6pqi5oz.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 27 Jul 2023 00:00 UTC

Paul Edwards <mutazilah@gmail.com> writes:

> On Thursday, July 27, 2023 at 3:24:24 AM UTC+8, Ben Bacarisse wrote:
>
>> I'm not sure what "starting in 1960" refers to. It can't refer to BCPL
>> or B and certainly not C. C started out as "new B" in about 1971 but
>> was only really something we'd call C by about 1974.
>>
>> The 360 series was developed in the early 1960s (first sold in 1965) so
>> so "IBM could have used C" is an odd thing to say. Some later versions
>> in C (like C90) were technically suitable, but the job had already been
>> done.
>
> Yeah, it's more a question of "if we had our time again".

Enjoy.

--
Ben.

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor