Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

What hath Bob wrought?


devel / comp.lang.c / Re: 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
Re: PL/M

<u9tl55$1sajh$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Thu, 27 Jul 2023 13:41:25 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <u9tl55$1sajh$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 Jul 2023 11:41:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a73b140d724915d3073e7cf4d4b344b4";
logging-data="1976945"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z9Vxz7zVczM51x+1+E37Zm5MA+CBHZrA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:XJAqO+1LRHMsdgsSjcQCQ3O3rvA=
In-Reply-To: <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Thu, 27 Jul 2023 11:41 UTC

On 26/07/2023 17:15, Paul Edwards wrote:
>
> 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.
>

I can't answer for the days of CP/M, but for the last twenty years at
least, C has been the main language of choice on 8-bit systems. 8-bit
exists almost exclusively in the world of small microcontrollers, and
while other languages (assembly, C++, Pascal, FORTH, Ada, BASIC) are all
used to some extent, C dominates.

There are two main ways in which the 16-bit "int" size is not a problem
on such systems. One is the use of compilers with a lot of extensions,
and possibly non-standard behaviour, geared towards more efficient
results. These are particularly popular on CISC 8-bit systems with few
registers.

The other method is better compiler optimisation - the compiler may
perform "int8_t a, b, c; a = b + c;" using just a single 8-bit add
despite the integer promotions to 16-bit, because it knows the result
will be correct.

(I have also seen the use of a C++ class that holds a single 8-bit value
and provides arithmetic operations, as a more efficient type than int8_t
because it is never subject to integer promotions. A limited subset of
C++ can work very well on 8-bit devices.)

Re: PL/M

<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a9d:b0:403:b85f:606a with SMTP id s29-20020a05622a1a9d00b00403b85f606amr14031qtc.3.1690462843274;
Thu, 27 Jul 2023 06:00:43 -0700 (PDT)
X-Received: by 2002:a4a:5257:0:b0:547:54e2:688a with SMTP id
d84-20020a4a5257000000b0054754e2688amr6778264oob.0.1690462841523; Thu, 27 Jul
2023 06:00:41 -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, 27 Jul 2023 06:00:41 -0700 (PDT)
In-Reply-To: <u9tl55$1sajh$1@dont-email.me>
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>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 27 Jul 2023 13:00:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Paul Edwards - Thu, 27 Jul 2023 13:00 UTC

On Thursday, July 27, 2023 at 7:41:40 PM UTC+8, David Brown wrote:

> I can't answer for the days of CP/M, but for the last twenty years at
> least, C has been the main language of choice on 8-bit systems. 8-bit
> exists almost exclusively in the world of small microcontrollers, and
> while other languages (assembly, C++, Pascal, FORTH, Ada, BASIC) are all
> used to some extent, C dominates.
>
> There are two main ways in which the 16-bit "int" size is not a problem
> on such systems. One is the use of compilers with a lot of extensions,
> and possibly non-standard behaviour, geared towards more efficient
> results. These are particularly popular on CISC 8-bit systems with few
> registers.

Ok, but that's almost an admission that C90 is not up to the task.
I have found C90 perfectly fine for my 16-bit and 32-bit
programming. ie I normally just define an "int" and let it
float.

> The other method is better compiler optimisation - the compiler may
> perform "int8_t a, b, c; a = b + c;" using just a single 8-bit add
> despite the integer promotions to 16-bit, because it knows the result
> will be correct.

Ok, but that is declaring a variable specifically as int8_t -
which didn't even exist in C90 - but "signed char" does, so
let's say that was used.

I normally don't define such a narrow type. I was "taught"
to define variables as "int" unless you have a good reason
to do otherwise, and let it match the natural word size
(which is why I expect "int" to be 64-bit on an x64).

I don't even use "short" - never had a reason to.

I don't think K & R 1 specified a minimum size for "int".

As such - what are the ramifications of making "int" 8 bits
on a 8080?

I mean - yes, I know that it violates the C90 standard, but
after 33 years of strict adherence to it, maybe it is time for
us to part ways.

But not upwards to C99.

Instead, just a little bit down towards K & R 1.

> (I have also seen the use of a C++ class that holds a single 8-bit value
> and provides arithmetic operations, as a more efficient type than int8_t
> because it is never subject to integer promotions. A limited subset of
> C++ can work very well on 8-bit devices.)

It seems odd to not simply make int 8 bits rather than go to all
that effort. People are spending a lot of effort to type int8_t and
use C++ at all for a reason - it's the natural word type and they
know it. And they know that "int" isn't doing what it was
conceptually meant to do.

Just conjecture - not saying I'm reading the situation correctly.

BFN. Paul.

Re: PL/M

<u9tsah$1svth$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Thu, 27 Jul 2023 15:43:45 +0200
Organization: A noiseless patient Spider
Lines: 157
Message-ID: <u9tsah$1svth$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me>
<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 27 Jul 2023 13:43:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a73b140d724915d3073e7cf4d4b344b4";
logging-data="1998769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bKhKzV/NQSgmCKl/1Q7cie+LgRwUriBs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:+x1ThCkiUpZKPzgYmHfMg83J8y4=
In-Reply-To: <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Thu, 27 Jul 2023 13:43 UTC

On 27/07/2023 15:00, Paul Edwards wrote:
> On Thursday, July 27, 2023 at 7:41:40 PM UTC+8, David Brown wrote:
>
>> I can't answer for the days of CP/M, but for the last twenty years at
>> least, C has been the main language of choice on 8-bit systems. 8-bit
>> exists almost exclusively in the world of small microcontrollers, and
>> while other languages (assembly, C++, Pascal, FORTH, Ada, BASIC) are all
>> used to some extent, C dominates.
>>
>> There are two main ways in which the 16-bit "int" size is not a problem
>> on such systems. One is the use of compilers with a lot of extensions,
>> and possibly non-standard behaviour, geared towards more efficient
>> results. These are particularly popular on CISC 8-bit systems with few
>> registers.
>
> Ok, but that's almost an admission that C90 is not up to the task.
> I have found C90 perfectly fine for my 16-bit and 32-bit
> programming. ie I normally just define an "int" and let it
> float.
>

It is an admission that toolchains are not up to the task - at least,
they can't generate ideal object code (especially for the ugly CISC
8-bit architectures with disjointed memory spaces) without adding to the
language and having the programmer write code in "Keil 8051" or "IAR
COP8" instead of standard C.

However, SDCC does a pretty good job while straying very little from
standard C, and for the 8-bit RISC AVR microcontroller, gcc is usually
used in a reasonably standard mode (there is an "8-bit int" mode
available if you want it, but I don't think it is much used).

Standard C is not a /great/ fit for such devices, but it is entirely
usable. For some 8-bit ISAs, like the Z80, it works well.

>> The other method is better compiler optimisation - the compiler may
>> perform "int8_t a, b, c; a = b + c;" using just a single 8-bit add
>> despite the integer promotions to 16-bit, because it knows the result
>> will be correct.
>
> Ok, but that is declaring a variable specifically as int8_t -
> which didn't even exist in C90 - but "signed char" does, so
> let's say that was used.
>

Yes - so what? People declare variables of all kinds of types.

And C99 became standard a generation ago - it's okay to use it.

> I normally don't define such a narrow type. I was "taught"
> to define variables as "int" unless you have a good reason
> to do otherwise, and let it match the natural word size
> (which is why I expect "int" to be 64-bit on an x64).

You were taught badly - or at least, badly outdated. A better rule is
to use the appropriate type for the task.

"int" is often a reasonable enough choice when you can't think of
anything better, and you are only working with small numbers (up to
16-bit) or know the platform must be 32-bit int minimum (maybe your code
is full of POSIX calls), and you are not storing a lot of them (you
don't want to waste cache space with big arrays of "int" when uint8_t
would have sufficed), and you don't need maximal speed for local
variables on 64-bit targets.

>
> I don't even use "short" - never had a reason to.

"short" is also /long/ outdated, IMHO. Use types that say what you
mean. "short" really doesn't say anything at all, and has no guarantees
that "int" does not also have.

But if ever have arrays of data that need to be efficient, using smaller
types is often faster because you get more of the data in your caches.
You generally don't need them for local variables, however.

"int" says "at least 16-bits, and a reasonably efficient local type for
calculations on the target". I'd prefer "int_fast16_t", meaning "at
least 16-bits and the most efficient local type on the target". On many
64-bit systems, this will be 64-bit in size because it can be handled
more efficiently.

>
> I don't think K & R 1 specified a minimum size for "int".
>

I believe they specified it had to be at least -32767 to 32767 in range,
but I don't have a copy of the book handy.

Regardless, K&R C is as relevant as ancient Latin - great for historical
interest, but not for any real-world coding done today.

> As such - what are the ramifications of making "int" 8 bits
> on a 8080?

It would be non-standard, and break with the assumptions made by a great
proportion of C code, even C code written by people who understand the
language and its standards, and write highly portable code.

Alternatively, you could say there are no ramifications because no one
will ever program for the 8080 again.

>
> I mean - yes, I know that it violates the C90 standard, but
> after 33 years of strict adherence to it, maybe it is time for
> us to part ways.
>

Why? What part of the last 33 years of programming suggests it would be
a good idea to do something radically at odds with all standards of C,
past, present and future, and virtually all existing C code? Who would
use such a mongrel language, and what benefit would it give them?

> But not upwards to C99.
>

C99 is a /hugely/ superior language to C90. I truly hate the very rare
occasions when I have no choice but to code to C90.

> Instead, just a little bit down towards K & R 1.

That would be even worse. (And the idea is based on your incorrect
beliefs about K&R C.)

>
>> (I have also seen the use of a C++ class that holds a single 8-bit value
>> and provides arithmetic operations, as a more efficient type than int8_t
>> because it is never subject to integer promotions. A limited subset of
>> C++ can work very well on 8-bit devices.)
>
> It seems odd to not simply make int 8 bits rather than go to all
> that effort.

The C++ class can be written in a few dozen lines in standard C++, and
works with any C++ toolchain. Making int 8 bits means significant
re-writing of your compiler (especially if you want top efficiency),
libraries, and other code. The difference in effort is enormous.

> People are spending a lot of effort to type int8_t and
> use C++ at all for a reason - it's the natural word type and they
> know it. And they know that "int" isn't doing what it was
> conceptually meant to do.
>

People use C++ for many reasons, just as they use C for many reasons. I
highly doubt if many people (even gcc AVR users) use C++ simply to be
able to make such 8-bit classes.

And they use "int8_t" because that's the type they mean. I can't see a
problem with that.

> Just conjecture - not saying I'm reading the situation correctly.
>
> BFN. Paul.
>

Re: PL/M

<KZuwM.250133$GMN3.2806@fx16.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.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> <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> <u9tl55$1sajh$1@dont-email.me> <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com> <u9tsah$1svth$1@dont-email.me>
Lines: 18
Message-ID: <KZuwM.250133$GMN3.2806@fx16.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 27 Jul 2023 14:15:06 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 27 Jul 2023 14:15:06 GMT
X-Received-Bytes: 1886
 by: Scott Lurndal - Thu, 27 Jul 2023 14:15 UTC

David Brown <david.brown@hesbynett.no> writes:
>On 27/07/2023 15:00, Paul Edwards wrote:
>> On Thursday, July 27, 2023 at 7:41:40 PM UTC+8, David Brown wrote:

>> As such - what are the ramifications of making "int" 8 bits
>> on a 8080?
>
>It would be non-standard, and break with the assumptions made by a great
>proportion of C code, even C code written by people who understand the
>language and its standards, and write highly portable code.
>
>Alternatively, you could say there are no ramifications because no one
>will ever program for the 8080 again.

You haven't been following alt.os.development. Paul believes that the
8080 and 8086 is the be-all and end-all of computing. A perfect architecture
in his opinion. He believes an apocalypse will occur in the future
and the 8080 will be the only survivor.

Re: PL/M

<dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ae9:df84:0:b0:762:55da:9784 with SMTP id t126-20020ae9df84000000b0076255da9784mr1973qkf.5.1690501064150;
Thu, 27 Jul 2023 16:37:44 -0700 (PDT)
X-Received: by 2002:a05:6808:1511:b0:3a1:ed05:198 with SMTP id
u17-20020a056808151100b003a1ed050198mr1458911oiw.2.1690501063962; Thu, 27 Jul
2023 16:37:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.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, 27 Jul 2023 16:37:43 -0700 (PDT)
In-Reply-To: <KZuwM.250133$GMN3.2806@fx16.iad>
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>
<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> <u9tl55$1sajh$1@dont-email.me>
<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com> <u9tsah$1svth$1@dont-email.me>
<KZuwM.250133$GMN3.2806@fx16.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 27 Jul 2023 23:37:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2243
 by: Paul Edwards - Thu, 27 Jul 2023 23:37 UTC

On Thursday, July 27, 2023 at 10:15:22 PM UTC+8, Scott Lurndal wrote:

> >Alternatively, you could say there are no ramifications because no one
> >will ever program for the 8080 again.

> You haven't been following alt.os.development. Paul believes that the
> 8080 and 8086 is the be-all and end-all of computing. A perfect architecture
> in his opinion. He believes an apocalypse will occur in the future
> and the 8080 will be the only survivor.

Lie. I said no such thing. Quote what I actually said instead
of putting words into my mouth.

BFN. Paul.

Re: PL/M

<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:199f:b0:3fd:d29e:5d37 with SMTP id u31-20020a05622a199f00b003fdd29e5d37mr19865qtc.1.1690579925700;
Fri, 28 Jul 2023 14:32:05 -0700 (PDT)
X-Received: by 2002:a05:6808:1818:b0:3a2:4d1d:2831 with SMTP id
bh24-20020a056808181800b003a24d1d2831mr6611665oib.3.1690579925321; Fri, 28
Jul 2023 14:32:05 -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: Fri, 28 Jul 2023 14:32:04 -0700 (PDT)
In-Reply-To: <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:5f82:5000:94f8:d643:43e6:2559;
posting-account=3ty6FAkAAACYEfch20jQ1ZACFatw-Vdx
NNTP-Posting-Host: 2600:1700:5f82:5000:94f8:d643:43e6:2559
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Fri, 28 Jul 2023 21:32:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 7606
 by: Ed Prochak - Fri, 28 Jul 2023 21:32 UTC

On Wednesday, July 26, 2023 at 11:15:18 AM UTC-4, Paul Edwards wrote:
> 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.

8bit machines often dealt with 16bit values, hence the ADC opcode.

> > > > > 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.

No but porting a version of unix to an 8 bit machine is possible.
Performance would suffer on 16bit and higher operations but
it is possible.

> > 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.

I know of one operating system that was written in COBOL.
One of the developers is a close friend of mine. So even
COBOL can be used. Not necessarily the best choice, but
sometimes there are other constraints on which tools you
are allowed to use.

And yes I still say that is doable, though not necessarily
easy, nor will it execute as fast on an 8bit processor as
a flavor developed with PL/M or C.

> > > 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 don't get it. You just seem to think C is the be-all and end-all of
programming languages. It isn't.

And as much as you might like to have C90 in 1964, it wasn't there.

>
> 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.

In the 1960's assembler was still a major programming language
for operating systems programming.

> > 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.

Well, programming in the constraints of an 8bit processor
can be an enlightening experience. You'd be amazed how
much can really be done.
>
> 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)?

The 8086 can address up to 1MB of RAM of which
640K was usable in MS DOS. (Refer to Bill Gates famous
quote about 640K!) So 360KB for PDOS/86 uses only
half of available memory.

>
> 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.

If you are doing PDOS/86, then you might want to find a C
compiler to target that flavor of Intel processor. Intel made
the 8086 compatible with the 8080 instruction set but added
the larger memory space and some other enhancements
(a PUSH ALL instruction, which is VERY useful).

If you have questions about the 8086 and 80186, email me. I have
the datasheet somewhere on my bookshelves.

You've got yourself a nice challenge.
Ed
I'm on gmail as edprochak.

Re: PL/M

<ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:450a:b0:635:e9f6:9470 with SMTP id oo10-20020a056214450a00b00635e9f69470mr24922qvb.5.1690586984764;
Fri, 28 Jul 2023 16:29:44 -0700 (PDT)
X-Received: by 2002:a05:6808:201d:b0:3a0:44fb:53c2 with SMTP id
q29-20020a056808201d00b003a044fb53c2mr7341869oiw.0.1690586984376; Fri, 28 Jul
2023 16:29:44 -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: Fri, 28 Jul 2023 16:29:44 -0700 (PDT)
In-Reply-To: <621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.92; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.92
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Fri, 28 Jul 2023 23:29:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 9150
 by: Paul Edwards - Fri, 28 Jul 2023 23:29 UTC

On Saturday, July 29, 2023 at 5:32:13 AM UTC+8, Ed Prochak wrote:

> > > 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.

> 8bit machines often dealt with 16bit values, hence the ADC opcode.

Sure. And that could possibly be "long".

> > > > > > 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.

> No but porting a version of unix to an 8 bit machine is possible.
> Performance would suffer on 16bit and higher operations but
> it is possible.

Again - I am surprised this can be fit into 64k.

> > > 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.

> I know of one operating system that was written in COBOL.
> One of the developers is a close friend of mine. So even
> COBOL can be used. Not necessarily the best choice, but
> sometimes there are other constraints on which tools you
> are allowed to use.
>
> And yes I still say that is doable, though not necessarily
> easy, nor will it execute as fast on an 8bit processor as
> a flavor developed with PL/M or C.

Ok.

> > > > 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 don't get it. You just seem to think C is the be-all and end-all of
> programming languages. It isn't.

I'm not really claiming that. I'm not a language expert.
It's just the language I happen to know, and I'm trying
to find its limits, and seeing what historical hardware
can be covered by it.

> And as much as you might like to have C90 in 1964, it wasn't there.

And 2023 wasn't in the 1960s at all. So what? My question
isn't dependent on what happened historically software-wise.

It is dependent on hardware capabilities though.

> > 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.

> In the 1960's assembler was still a major programming language
> for operating systems programming.

But it didn't need to be. If we had our time again, we would
have whipped out a C90 compiler as quickly as possible.
Perhaps?

> > > 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.

> Well, programming in the constraints of an 8bit processor
> can be an enlightening experience. You'd be amazed how
> much can really be done.

Sure. That's what I'm gearing up to do.

> > 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)?

> The 8086 can address up to 1MB of RAM of which
> 640K was usable in MS DOS. (Refer to Bill Gates famous
> quote about 640K!) So 360KB for PDOS/86 uses only
> half of available memory.

There is data as well, and also a conceptually simple
design "requires" the loader and OS to be at fixed
locations, so that chews up some space.

Once the OS is loaded it is flexible, but by then it's too late.

And then to spawn another program using C90, system()
is used, which loads another copy of command.com, so
there's almost nothing left.

Yes, you can use some tricks to reduce space, but I don't
want to take away the design simplicity, so my solution
is to switch to the 80286 so that I have 2 MB. I haven't
done that yet though.

> > > 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.
> >
> If you are doing PDOS/86, then you might want to find a C
> compiler to target that flavor of Intel processor. Intel made
> the 8086 compatible with the 8080 instruction set but added
> the larger memory space and some other enhancements
> (a PUSH ALL instruction, which is VERY useful).

Pardon? PDOS/86 has already been done, and it is already
written mostly in C, and I already have several C compilers
capable of producing 8086 code, although only 2 (that I
have encountered to date) can produce the huge memory
model I use (again, for simplicity).

> If you have questions about the 8086 and 80186, email me. I have
> the datasheet somewhere on my bookshelves.
>
> You've got yourself a nice challenge.

The 8086 challenge is already done. 80286 and 8080
haven't been done. x64 has only been done to proof of
concept.

BFN. Paul.

Re: PL/M

<ua1l1v$2chh1$1@dont-email.me>

  copy mid

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

  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, 29 Jul 2023 01:04:15 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <ua1l1v$2chh1$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 29 Jul 2023 00:04:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4499a152026011cd009e4bb37a25d4eb";
logging-data="2508321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18la7N93bNv0G3nQk+SUGBLs1XGCBuWlPM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:T9ynJsFo8uZLSot4KfGrleM90Cw=
In-Reply-To: <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
 by: Bart - Sat, 29 Jul 2023 00:04 UTC

On 26/07/2023 16:15, Paul Edwards wrote:

> 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,

Are you talking about 8080 here or 8086?

As for the 360KB, does all the code on the disk need to be resident in
memory at the same time?

From what I remember of those primitives OSes, they basically just had
to provide a file system for running applications to use.

That could be done in a few KB. I used to write boot loaders that could
read disk sectors in a few hundred bytes, and reading a simple disk
format like FAT is trivial.

Re: PL/M

<7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:5a41:0:b0:767:33a2:f4c2 with SMTP id o62-20020a375a41000000b0076733a2f4c2mr10317qkb.5.1690589705322;
Fri, 28 Jul 2023 17:15:05 -0700 (PDT)
X-Received: by 2002:a05:620a:1991:b0:76a:e74a:2643 with SMTP id
bm17-20020a05620a199100b0076ae74a2643mr11721qkb.9.1690589705067; Fri, 28 Jul
2023 17:15:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.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: Fri, 28 Jul 2023 17:15:04 -0700 (PDT)
In-Reply-To: <u9tsah$1svth$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.92; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.92
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me> <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Sat, 29 Jul 2023 00:15:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Paul Edwards - Sat, 29 Jul 2023 00:15 UTC

On Thursday, July 27, 2023 at 9:44:00 PM UTC+8, David Brown wrote:

> > Ok, but that is declaring a variable specifically as int8_t -
> > which didn't even exist in C90 - but "signed char" does, so
> > let's say that was used.
> >
> Yes - so what? People declare variables of all kinds of types.

For what reason would people be declaring an integral
type int8_t? I've never felt the need to do that. I just
use "int" and expect that to be portable.

When you're programming on an x64 how often do you
code int8_t? I bet people are coding int8_t when they're
about to build an 8080 program because they know
what the immediate resource constraints are and are
basically writing non-portable code.

I guess that's an underlying assumption I failed to mention.

I'm trying to write portable code, even for my operating
system code (obviously with the exception of some
minimal assembler).

> And C99 became standard a generation ago - it's okay to use it.

Cobol was a standard in various years too. It's OK to use
that too.

My question is about C90. That is the language I know
and wish to use.

One day I may rewrite my entire C90 OS and toolchain
in Pascal or Turtle Graphics, but I haven't completed
C90 yet.

> > I normally don't define such a narrow type. I was "taught"
> > to define variables as "int" unless you have a good reason
> > to do otherwise, and let it match the natural word size
> > (which is why I expect "int" to be 64-bit on an x64).

> You were taught badly - or at least, badly outdated. A better rule is
> to use the appropriate type for the task.

This is a conceptual change to give a new language.

I'm not saying that it's right or wrong (I'm not claiming to
be a language expert). I'm just saying that it's not the
language I am currently programming in, and my question
is about C90. Or possibly K&R C 1. ie the original intent
of the language.

I am exploring what Ritchie had in mind. I am willing to
change it if I find a place where Ritchie was "obviously"
insane, but so far I haven't found anything wrong at all.

> "int" is often a reasonable enough choice when you can't think of
> anything better, and you are only working with small numbers (up to
> 16-bit) or know the platform must be 32-bit int minimum (maybe your code
> is full of POSIX calls), and you are not storing a lot of them (you
> don't want to waste cache space with big arrays of "int" when uint8_t
> would have sufficed), and you don't need maximal speed for local
> variables on 64-bit targets.

It is not that I will "only be working with small numbers".
It is that I am expecting the program to adapt to - and
have the same limitations as - the target machine, not
the source code.

So if I have a calculator program, I expect to be able to add
up numbers to 2**31 on a 32-bit machine and up to 127 on
the 8080. If my "users" (ie me) doesn't like that, then they
should upgrade processor.

A calculator is not a particularly good example. The number
of arguments to main() would be a better example.

> > I don't even use "short" - never had a reason to.

> "short" is also /long/ outdated, IMHO. Use types that say what you
> mean. "short" really doesn't say anything at all, and has no guarantees
> that "int" does not also have.

And what I normally mean is "adapt to the target machine's
natural word size as Ritchie said (as far as I know that's what
he said)".

Unless I'm dealing with files, and then I use "long", as C90 says.

> "int" says "at least 16-bits, and a reasonably efficient local type for

It didn't say that in K&R 1 and I am questioning the ANSI
committee's decision to put a constraint there.

Maybe they figured that no-one would ever program
for the 8080 again so no-one will complain.

That was an incorrect assumption.

> > I don't think K & R 1 specified a minimum size for "int".
> >
> I believe they specified it had to be at least -32767 to 32767 in range,
> but I don't have a copy of the book handy.

I believe that is wrong, and was answered a month ago
or something. I was expecting someone else to confirm
that before I replied.

> Regardless, K&R C is as relevant as ancient Latin - great for historical
> interest, but not for any real-world coding done today.

I'm not necessarily doing what you call "real-world coding".

The Israelis revived Hebrew too, right?

There may be a circumstance where an allegedly dead language
unexpectedly comes alive.

E.g. I decide to lock my daughter up in a basement with
just access to UC386. Or she locks me up. If that happens
as of today you don't even get C90. You get the SubC
subset. There are people working on changing that situation
but it's an awfully slow process regardless of how many people
(who aren't doing the work) say how "easy" it is.

There is an OS called "Collapse OS" written on the belief
that supply systems are going to collapse. This was
pre-Covid too.

The next virus may only leave 1% of the population alive.

> > As such - what are the ramifications of making "int" 8 bits
> > on a 8080?

> It would be non-standard, and break with the assumptions made by a great
> proportion of C code, even C code written by people who understand the
> language and its standards, and write highly portable code.

And could that code be rewritten to be portable within
the "new" non-standard rules?

> Alternatively, you could say there are no ramifications because no one
> will ever program for the 8080 again.

That's not true. That's the entire basis of this thread. I am
gearing up to program on the 8080 unless I believe it is not
possible (which is what I previously believed).

Am I the only person doing that? In the last 2 weeks I have
spoken to 2 people who are interested in running CP/M-80.

That's not them personally programming on the 8080
though.

> > I mean - yes, I know that it violates the C90 standard, but
> > after 33 years of strict adherence to it, maybe it is time for
> > us to part ways.
> >
> Why? What part of the last 33 years of programming suggests it would be
> a good idea to do something radically at odds with all standards of C,
> past, present and future, and virtually all existing C code? Who would
> use such a mongrel language, and what benefit would it give them?

I would use it if I thought it was wise to do so.

The benefit would be PDOS-generic (as opposed to
PDOS/x86) running on 8-bit to 64-bit machines with
common source code. Not even conditional compilation.

And it's not "the last 33 years of programming" - it's what
was missed in the 1970s because PL/M was used instead
of C.

I missed it (even though I was alive) both because I was too
young to have a computer and because since then I have
had other priorities. It was only a few years ago that I even
realized that I should have written PDOS/86 using the huge
memory model, and only a few weeks ago (I think) that I
completed that model.

> > But not upwards to C99.
> >
> C99 is a /hugely/ superior language to C90. I truly hate the very rare
> occasions when I have no choice but to code to C90.

And C90 is hugely superior to SubC, and I'm still waiting
for that gap to be closed.

My question is not about what YOU should use - I did not
comment on that. Nor did I comment on which language
was "best" for any particular purpose at all.

> > Instead, just a little bit down towards K & R 1.

> That would be even worse. (And the idea is based on your incorrect
> beliefs about K&R C.)

I don't think it is me who is incorrect about K & R C 1.

> >> (I have also seen the use of a C++ class that holds a single 8-bit value
> >> and provides arithmetic operations, as a more efficient type than int8_t
> >> because it is never subject to integer promotions. A limited subset of
> >> C++ can work very well on 8-bit devices.)
> >
> > It seems odd to not simply make int 8 bits rather than go to all
> > that effort.

> The C++ class can be written in a few dozen lines in standard C++, and
> works with any C++ toolchain. Making int 8 bits means significant
> re-writing of your compiler (especially if you want top efficiency),
> libraries, and other code. The difference in effort is enormous.

Writing an application, writing an OS, and writing a compiler
are independent tasks.

I don't expect a person writing an application to do the
toolchain rewrite.

If it makes sense - and I don't have a solid opinion yet - then
I will potentially organize the toolchain modifications such
that when the application programmer referred to above
needs to make a decision on which way to jump, "significant
rewriting of your compiler" is not a factor.


Click here to read the complete article
Re: PL/M

<3d83c7b4-0110-4b68-a061-fcba0f878c9an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:8787:0:b0:76c:7fa9:6ac with SMTP id j129-20020a378787000000b0076c7fa906acmr9520qkd.11.1690590500765;
Fri, 28 Jul 2023 17:28:20 -0700 (PDT)
X-Received: by 2002:a05:6808:bd1:b0:3a1:e5f2:455c with SMTP id
o17-20020a0568080bd100b003a1e5f2455cmr7731946oik.8.1690590500523; Fri, 28 Jul
2023 17:28:20 -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: Fri, 28 Jul 2023 17:28:20 -0700 (PDT)
In-Reply-To: <ua1l1v$2chh1$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.92; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.92
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<ua1l1v$2chh1$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3d83c7b4-0110-4b68-a061-fcba0f878c9an@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Sat, 29 Jul 2023 00:28:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3725
 by: Paul Edwards - Sat, 29 Jul 2023 00:28 UTC

On Saturday, July 29, 2023 at 8:04:30 AM UTC+8, Bart wrote:

> > 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,

> Are you talking about 8080 here or 8086?

8086.

> As for the 360KB, does all the code on the disk need to be resident in
> memory at the same time?

Using my conceptually simple (and hopefully understandable)
design, yes.

> From what I remember of those primitives OSes, they basically just had
> to provide a file system for running applications to use.
>
> That could be done in a few KB. I used to write boot loaders that could
> read disk sectors in a few hundred bytes, and reading a simple disk
> format like FAT is trivial.

"trivial" is relative.

I've personally written FAT-12 and FAT-16 reading. It took years
before I finally managed to get writing done (just wondering
how to do it). I never got FAT-12 writing to work (didn't know
how to do it).

Someone else came along and added FAT-12 writing and
FAT-32 reading and writing, and they did it quickly as far as
I know.

I asked that same person (Alica from Slovakia) why they
didn't write their own OS and she said she had tried but
didn't know how to start.

So different people have different skills.

I tried to hire a group of budding computing friends who
turned up to a group to fix a bug in the FAT code.

They were excited at first, but they eventually decided
they couldn't do it. I suspect they were traumatized by
the experience.

So yeah, not everyone is a brainbox who finds this
stuff "trivial" to do. As for a few k, all the FAT code
(including LFN) is 3844 lines long and compiles to
this 8086 object code:

2023-07-29 08:22 56,783 fat.obj

almost blowing away the entire 64k possible in an
8-bit system, nevermind the smaller memory
footprints I believe CP/M could handle (MSDOS
1.0 certainly could).

BFN. Paul.

Re: PL/M

<ua1osb$2d45c$1@dont-email.me>

  copy mid

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

  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, 29 Jul 2023 02:09:31 +0100
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <ua1osb$2d45c$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me>
<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me>
<7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 29 Jul 2023 01:09:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4499a152026011cd009e4bb37a25d4eb";
logging-data="2527404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+M6f2dJ7p/JcrrFuIEc6O/hPD6mk7SGV8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:jc74OFGd6knigVfE24yEdN2xVrs=
In-Reply-To: <7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
 by: Bart - Sat, 29 Jul 2023 01:09 UTC

On 29/07/2023 01:15, Paul Edwards wrote:
> On Thursday, July 27, 2023 at 9:44:00 PM UTC+8, David Brown wrote:
>
>>> Ok, but that is declaring a variable specifically as int8_t -
>>> which didn't even exist in C90 - but "signed char" does, so
>>> let's say that was used.
>>>
>> Yes - so what? People declare variables of all kinds of types.
>
> For what reason would people be declaring an integral
> type int8_t? I've never felt the need to do that. I just
> use "int" and expect that to be portable.
>
> When you're programming on an x64 how often do you
> code int8_t?

I'm astonished that you're asking such a question. I'd assumed you were
a programmer with decades of experience, and you're asking when you
would ever use a Byte type instead of an Int?

(Presumably your String types have been sequences of (Ints rather than
Bytes?)

But the answer to your question is: when defining discrete variables,
you use Int; when creating data structures with arrays and structs, you
will consider narrow types to minimise memory reqirements or to match
external requirements.

Memory is important now because it is so slow to access; and it was
important then because there was so little of it!

> So if I have a calculator program, I expect to be able to add
> up numbers to 2**31 on a 32-bit machine and up to 127 on
> the 8080.

That would be a very poor calculator, useless actually. You can do far
better with 8080.

BTW why the obsession with 8080? A far superior superset was Z80.

It was easier to use: single supply voltage instead of three; simple,
square wave clock, higher clock speeds that didn't need a quartz crystal ...

You didn't need an array of special (and expensive) Intel support chips
either. (I don't know if there have been better 8080s since then.)

Plus more registers and more instructions.

On Z80, I used 8-byte bytes, 16-byte ints and 32-bit floats (emulated in
software). That would make for a nice little calculator.

> That's not true. That's the entire basis of this thread. I am
> gearing up to program on the 8080 unless I believe it is not
> possible (which is what I previously believed).

Go for Z80; the chances are there will be more of those about after an
apocalypse than 8080.

> And it's not "the last 33 years of programming" - it's what
> was missed in the 1970s because PL/M was used instead
> of C.

Why you regard C so highly even though it leaves so many things
open-ended? To me PL/M seems much better suited to the requirements of
the time!

Re: PL/M

<3d4cf4eb-6840-4484-a982-bed71e645992n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:491b:b0:76c:8423:b675 with SMTP id ed27-20020a05620a491b00b0076c8423b675mr12631qkb.5.1690593527019;
Fri, 28 Jul 2023 18:18:47 -0700 (PDT)
X-Received: by 2002:a05:6870:8c35:b0:1b0:271d:29e5 with SMTP id
ec53-20020a0568708c3500b001b0271d29e5mr5165869oab.0.1690593526665; Fri, 28
Jul 2023 18:18:46 -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: Fri, 28 Jul 2023 18:18:46 -0700 (PDT)
In-Reply-To: <ua1osb$2d45c$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=98.97.82.20; posting-account=-HhTfwoAAABskJx3_pJkV8K-m7HAraHl
NNTP-Posting-Host: 98.97.82.20
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me> <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me> <7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
<ua1osb$2d45c$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3d4cf4eb-6840-4484-a982-bed71e645992n@googlegroups.com>
Subject: Re: PL/M
From: joemon...@gmail.com (Joe Monk)
Injection-Date: Sat, 29 Jul 2023 01:18:47 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 5
 by: Joe Monk - Sat, 29 Jul 2023 01:18 UTC

> BTW why the obsession with 8080? A far superior superset was Z80.

His obsession is around the fact that he just bought a notebook computer with an NEC V20 chip, which has 8080 emulation.

Joe

Re: PL/M

<c06ae02b-74c4-4a12-a094-7d0bbdf18895n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ae9:de03:0:b0:765:942d:b19 with SMTP id s3-20020ae9de03000000b00765942d0b19mr27686qkf.13.1690775696497;
Sun, 30 Jul 2023 20:54:56 -0700 (PDT)
X-Received: by 2002:a05:6870:954d:b0:1be:c164:61a8 with SMTP id
v13-20020a056870954d00b001bec16461a8mr5397277oal.7.1690775696095; Sun, 30 Jul
2023 20:54:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Sun, 30 Jul 2023 20:54:55 -0700 (PDT)
In-Reply-To: <ed3ae7fd-877a-4d9f-88db-940299128fbcn@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>
<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>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com> <ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c06ae02b-74c4-4a12-a094-7d0bbdf18895n@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Mon, 31 Jul 2023 03:54:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 11619
 by: Ed Prochak - Mon, 31 Jul 2023 03:54 UTC

On Friday, July 28, 2023 at 7:29:54 PM UTC-4, Paul Edwards wrote:
> On Saturday, July 29, 2023 at 5:32:13 AM UTC+8, Ed Prochak wrote:
>
> > > > 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.
>
> > 8bit machines often dealt with 16bit values, hence the ADC opcode.
> Sure. And that could possibly be "long".
> > > > > > > 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.
>
> > No but porting a version of unix to an 8 bit machine is possible.
> > Performance would suffer on 16bit and higher operations but
> > it is possible.
> Again - I am surprised this can be fit into 64k.

At first I was going to hold out GEOS for the Commadore64
as an example of a nearly modern GUI Operating system
that fits in 64K. But we were talking Unix, SO...

....I did a little digging. According to gunkies.org
https://gunkies.org/wiki/UNIX_First_Edition
"The UNIX First Edition (V1) occurred when UNIX was
re-written for the then-new PDP-11, a 'cheap' minicomputer,
from the PDP-7 for which it was originally written, at Bell
Laboratories."

Both the PDP-7 and PDP-11/20 (the first PDP-11 model)
came with 4K-words (8kbytes) of core memory.

64Kbytes leaves lots of room.

[snip the COBOL sidebar]
> > > > > 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 don't get it. You just seem to think C is the be-all and end-all of
> > programming languages. It isn't.
> I'm not really claiming that. I'm not a language expert.
> It's just the language I happen to know, and I'm trying
> to find its limits, and seeing what historical hardware
> can be covered by it.

Well you will need to gain some understanding of programming
language features and architecture. What may seem to be simple
differences can have significant effects on performance and
usability.

Looking at your other posts I now understand that you want a
couple of things--
ONE: a C standard language that is usable from what I'll call
server/mainframe class processors (64bit)
down to
utility class processors (8bit).
Note: glad to see you are not asking to include 4 bit processors!

TWO: the ability to write an Operating system in that standard
C language that is portable from utility class to server class
hardware.

Sorry but you hit a key limit of the C language. I doubt ANY
language can meet both of those goals at the same time.

Just consider GNU/LINUX. Even though the LINUX kernel
is is available on many processors and platforms, these
are all a minimum of 32bit processors. And the source code
is not portable in the sense that it had compile conditionals
to modify the code as needed for the target hardware.

> > And as much as you might like to have C90 in 1964, it wasn't there.
> And 2023 wasn't in the 1960s at all. So what? My question
> isn't dependent on what happened historically software-wise.
>
Yes it is dependent on the historical changes.
There had been a LOT of changes in software design and languages
even in the 30 years from 1960 to 1990. Critical sections and
semaphores were just being defined in the early 1960s. These
are key to multitasking Operating Systems.

> It is dependent on hardware capabilities though.

As I mentioned above, your goal may not be possible.

> > > 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.
>
> > In the 1960's assembler was still a major programming language
> > for operating systems programming.
> But it didn't need to be. If we had our time again, we would
> have whipped out a C90 compiler as quickly as possible.
> Perhaps?

Again, you are ignoring the historical context.
By your reasoning, the ancients should have been able to
move directly from bronze to stainless steel.
Progress just doesn't happen that way.

> > > > 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.
>
May I ask, are you skilled in assembly language?
For which processors?

It should not be a big step from 6502 to 8080 assembler.
On the 6502 did you program at the low level, bare hardware?
Or within a defined environment (like a commadore64)?

> > Well, programming in the constraints of an 8bit processor
> > can be an enlightening experience. You'd be amazed how
> > much can really be done.
> Sure. That's what I'm gearing up to do.
Cheers!

> > > 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)?
>
> > The 8086 can address up to 1MB of RAM of which
> > 640K was usable in MS DOS. (Refer to Bill Gates famous
> > quote about 640K!) So 360KB for PDOS/86 uses only
> > half of available memory.
> There is data as well, and also a conceptually simple
> design "requires" the loader and OS to be at fixed
> locations, so that chews up some space.
>
> Once the OS is loaded it is flexible, but by then it's too late.
>
> And then to spawn another program using C90, system()
> is used, which loads another copy of command.com, so
> there's almost nothing left.

It begins with how much you started with.
As noted above original UNIX ran in 8KB (4K of 16bit words)
>
> Yes, you can use some tricks to reduce space, but I don't
> want to take away the design simplicity, so my solution
> is to switch to the 80286 so that I have 2 MB. I haven't
> done that yet though.

So which target are you programming for, 8bit or 32 bit?

> > > > 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.
> > >
> > If you are doing PDOS/86, then you might want to find a C
> > compiler to target that flavor of Intel processor. Intel made
> > the 8086 compatible with the 8080 instruction set but added
> > the larger memory space and some other enhancements
> > (a PUSH ALL instruction, which is VERY useful).
> Pardon? PDOS/86 has already been done, and it is already
> written mostly in C, and I already have several C compilers
> capable of producing 8086 code, although only 2 (that I
> have encountered to date) can produce the huge memory
> model I use (again, for simplicity).


Click here to read the complete article
Re: PL/M

<8cb3732f-e0b8-41af-82c3-db6685c257d6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:5808:0:b0:40a:c625:970f with SMTP id g8-20020ac85808000000b0040ac625970fmr18871qtg.6.1690776722596;
Sun, 30 Jul 2023 21:12:02 -0700 (PDT)
X-Received: by 2002:a05:6808:1588:b0:39c:a74b:81d6 with SMTP id
t8-20020a056808158800b0039ca74b81d6mr17378382oiw.7.1690776722372; Sun, 30 Jul
2023 21:12:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Sun, 30 Jul 2023 21:12:02 -0700 (PDT)
In-Reply-To: <3d83c7b4-0110-4b68-a061-fcba0f878c9an@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>
<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>
<ua1l1v$2chh1$1@dont-email.me> <3d83c7b4-0110-4b68-a061-fcba0f878c9an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8cb3732f-e0b8-41af-82c3-db6685c257d6n@googlegroups.com>
Subject: Re: PL/M
From: edproc...@gmail.com (Ed Prochak)
Injection-Date: Mon, 31 Jul 2023 04:12:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2572
 by: Ed Prochak - Mon, 31 Jul 2023 04:12 UTC

On Friday, July 28, 2023 at 8:28:29 PM UTC-4, Paul Edwards wrote:
[]
> So yeah, not everyone is a brainbox who finds this
> stuff "trivial" to do. As for a few k, all the FAT code
> (including LFN) is 3844 lines long and compiles to
> this 8086 object code:
>
> 2023-07-29 08:22 56,783 fat.obj
>
> almost blowing away the entire 64k possible in an
> 8-bit system, nevermind the smaller memory
> footprints I believe CP/M could handle (MSDOS
> 1.0 certainly could).
>
> BFN. Paul.

Okay. I am trying to make sure I don't offend you here,
but
you do know that the OBJ file contains more than the
executable code and that even the code it contains
may not be in binary format,
RIGHT?

Ed

Re: PL/M

<X_Scncuj7JOi5lr5nZ2dnZfqnPidnZ2d@supernews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 31 Jul 2023 09:13:35 +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> <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> <621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com> <ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com> <c06ae02b-74c4-4a12-a094-7d0bbdf18895n@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: <X_Scncuj7JOi5lr5nZ2dnZfqnPidnZ2d@supernews.com>
Date: Mon, 31 Jul 2023 09:13:35 +0000
Lines: 9
X-Trace: sv3-evUg3VJO1Xqpr/41KrCKdOna8MHDMJLevWJm5qgD/PJBiYgX0/bDvFi2CNJ8qmnRUJuWBREKB8mGaWY!hg3nbS8MXgaKnVg/9fuEP4q7ArEaXWiaUC7xIFg1lm5BayVdR/2oUK5MIN5wN6FFYHxOx7U6lCSo!jt8IG4agd2s=
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, 31 Jul 2023 09:13 UTC

Ed Prochak <edprochak@gmail.com> wrote:
> As noted above original UNIX ran in 8KB (4K of 16bit words)

No it didn't, and IMO it couldn't have done. It ran in 24k, and at
that time it was mostly still written in assembly language.

https://www.bell-labs.com/usr/dmr/www/1stEdman.html

Andrew.

Re: PL/M

<03f13187-ddf4-45a5-90cb-11da5fb24a11n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1809:b0:403:f563:30e1 with SMTP id t9-20020a05622a180900b00403f56330e1mr39170qtc.10.1690805450386;
Mon, 31 Jul 2023 05:10:50 -0700 (PDT)
X-Received: by 2002:a05:6870:c792:b0:1bb:5fac:524e with SMTP id
dy18-20020a056870c79200b001bb5fac524emr13066298oab.5.1690805449735; Mon, 31
Jul 2023 05:10:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.1d4.us!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: Mon, 31 Jul 2023 05:10:49 -0700 (PDT)
In-Reply-To: <X_Scncuj7JOi5lr5nZ2dnZfqnPidnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=98.97.82.20; posting-account=-HhTfwoAAABskJx3_pJkV8K-m7HAraHl
NNTP-Posting-Host: 98.97.82.20
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com> <ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com>
<c06ae02b-74c4-4a12-a094-7d0bbdf18895n@googlegroups.com> <X_Scncuj7JOi5lr5nZ2dnZfqnPidnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03f13187-ddf4-45a5-90cb-11da5fb24a11n@googlegroups.com>
Subject: Re: PL/M
From: joemon...@gmail.com (Joe Monk)
Injection-Date: Mon, 31 Jul 2023 12:10:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2462
 by: Joe Monk - Mon, 31 Jul 2023 12:10 UTC

> > As noted above original UNIX ran in 8KB (4K of 16bit words)
> No it didn't, and IMO it couldn't have done. It ran in 24k, and at
> that time it was mostly still written in assembly language.
>

"The UNIX Time-Sharing System

D. M. Ritchie"

"The PDP-11 on which UNIX is implemented is a 16-bit 12K computer,
and UNIX occupies 8K words. More than half of this space,
however, is utilized for a variable number of disk buffers; with
some loss of speed the number of buffers could be cut significantly."

https://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/UnixEditionZero.txt

Joe

Re: PL/M

<ua95pr$3cff7$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: vir.camp...@invalid.invalid (Vir Campestris)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Mon, 31 Jul 2023 21:32:59 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ua95pr$3cff7$1@dont-email.me>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.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>
<u9tl55$1sajh$1@dont-email.me>
<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me> <KZuwM.250133$GMN3.2806@fx16.iad>
<dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 31 Jul 2023 20:32:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="290f95af3db43448d4de72180f744b07";
logging-data="3554791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jlwiA3znu7BL7eLVU00FMbsB+bohFLyE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:FjSMR2o+JCiNMUMVd2lKwlg975E=
In-Reply-To: <dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com>
Content-Language: en-GB
 by: Vir Campestris - Mon, 31 Jul 2023 20:32 UTC

On 28/07/2023 00:37, Paul Edwards wrote:
> On Thursday, July 27, 2023 at 10:15:22 PM UTC+8, Scott Lurndal wrote:
>
>>> Alternatively, you could say there are no ramifications because no one
>>> will ever program for the 8080 again.
>
>> You haven't been following alt.os.development. Paul believes that the
>> 8080 and 8086 is the be-all and end-all of computing. A perfect architecture
>> in his opinion. He believes an apocalypse will occur in the future
>> and the 8080 will be the only survivor.
>
> Lie. I said no such thing. Quote what I actually said instead
> of putting words into my mouth.
>
> BFN. Paul.

I haven't been following alt.os.development, and I have no intention of
doing so. But giving the correct quotation would read better than an
insult, whether or not it is justified.

(And BTW, as someone who spent decades making a living out of 8080 and
its successors - I didn't like any of them)

Andy

Re: PL/M

<ua963d$3cff7$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: vir.camp...@invalid.invalid (Vir Campestris)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Mon, 31 Jul 2023 21:38:05 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <ua963d$3cff7$2@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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Jul 2023 20:38:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="290f95af3db43448d4de72180f744b07";
logging-data="3554791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189s2Nw3H+iOQjvevLDNggUTfYBv6qWYdk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:8OkjfpfOpMc1VGhA+/iZsH6QtGg=
In-Reply-To: <621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
Content-Language: en-GB
 by: Vir Campestris - Mon, 31 Jul 2023 20:38 UTC

On 28/07/2023 22:32, Ed Prochak wrote:

>>No but porting a version of unix to an 8 bit machine is possible.
>>Performance would suffer on 16bit and higher operations but
>>it is possible.

All the genuine 8-bit machines I've used were limited to 64k RAM. CPU
speed might not be an issue, but I think RAM size would be.

<snip>
>> 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.
> In the 1960's assembler was still a major programming language
> for operating systems programming.
>

Later than that. ICL's VME/K wasn't cancelled until the beginning of the
80s - and it was entirely written in assembler. Unlike VME/B.

Andy

Re: PL/M

<ua98re$3crg5$1@dont-email.me>

  copy mid

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

  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, 31 Jul 2023 22:25:04 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <ua98re$3crg5$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com>
<ua963d$3cff7$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Jul 2023 21:25:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="51aa2a7e095edcf22b641ee82ce4440a";
logging-data="3567109"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hfUIeFd9yq2gx3klg9RjaB6fs/lYG3ig="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:XWbhNmUAmYGy0qRFFAJFOk684m8=
In-Reply-To: <ua963d$3cff7$2@dont-email.me>
 by: Bart - Mon, 31 Jul 2023 21:25 UTC

On 31/07/2023 21:38, Vir Campestris wrote:
> On 28/07/2023 22:32, Ed Prochak wrote:
>
> >>No but porting a version of unix to an 8 bit machine is possible.
> >>Performance would suffer on 16bit and higher operations but
> >>it is possible.
>
> All the genuine 8-bit machines I've used were limited to 64k RAM. CPU
> speed might not be an issue, but I think RAM size would be.

I've used at least one with 256KB memory (eg. the PCW 8256), and also
created a Z80-based prototype myself with extra, bank-switched memory.

An OS could use clever bank-switching, or it can use the extra memory
for a RAMdisk, or for data rather than code. There are possibilities.

But in the end it was easier to switch to 8088/86-based machines even
with their segmented memory.

Re: PL/M

<ua9b5n$2vpkt$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Mon, 31 Jul 2023 22:04:39 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ua9b5n$2vpkt$1@news.xmission.com>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com> <KZuwM.250133$GMN3.2806@fx16.iad> <dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com> <ua95pr$3cff7$1@dont-email.me>
Injection-Date: Mon, 31 Jul 2023 22:04:39 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3139229"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 31 Jul 2023 22:04 UTC

In article <ua95pr$3cff7$1@dont-email.me>,
Vir Campestris <vir.campestris@invalid.invalid> wrote:
....
>(And BTW, as someone who spent decades making a living out of 8080 and
>its successors - I didn't like any of them)

Kinda like working at McDonalds, right?

--
When someone tells me he/she is a Christian I check to see if I'm
still in possession of my wallet.

Re: PL/M

<20230731151545.532@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Mon, 31 Jul 2023 22:22:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20230731151545.532@kylheku.com>
References: <0e28c4e8-19e2-4d66-a4a5-20ff20c0ed6dn@googlegroups.com>
<KZuwM.250133$GMN3.2806@fx16.iad>
<dcf55402-d2f1-4169-b109-5215ac1cef4bn@googlegroups.com>
<ua95pr$3cff7$1@dont-email.me> <ua9b5n$2vpkt$1@news.xmission.com>
Injection-Date: Mon, 31 Jul 2023 22:22:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fee1265ba4d20e6079a0bd3281f49ec3";
logging-data="3580224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Bkh4KPkGOXbJGWgdpFl9YQyeIR8fD/aM="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:dR+KXxWNmN1mfA8oC82w8LeA2No=
 by: Kaz Kylheku - Mon, 31 Jul 2023 22:22 UTC

On 2023-07-31, Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <ua95pr$3cff7$1@dont-email.me>,
> Vir Campestris <vir.campestris@invalid.invalid> wrote:
> ...
>>(And BTW, as someone who spent decades making a living out of 8080 and
>>its successors - I didn't like any of them)
>
> Kinda like working at McDonalds, right?

Well ... you can work with and dislike the 8080, but still like a solid
three out of these four: coworkers, boss, customers, compensation.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: PL/M

<uabvfm$3pcm5$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: PL/M
Date: Wed, 2 Aug 2023 00:03:33 +0200
Organization: A noiseless patient Spider
Lines: 390
Message-ID: <uabvfm$3pcm5$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>
<769232bf-f759-44e8-84ed-4835735b6897n@googlegroups.com>
<b4842421-c508-4620-9232-4d785f5347ffn@googlegroups.com>
<e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me>
<432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me>
<7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 1 Aug 2023 22:03:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="46e2fd4c97e01cfd809944807e1c85c2";
logging-data="3977925"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kUnB2zGGu3nyUOJW3OKO2RzcZzFyNYF0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:87i3VUeD1NWu4P+KNvOQ3modQ14=
In-Reply-To: <7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 1 Aug 2023 22:03 UTC

On 29/07/2023 02:15, Paul Edwards wrote:
> On Thursday, July 27, 2023 at 9:44:00 PM UTC+8, David Brown wrote:
>
>>> Ok, but that is declaring a variable specifically as int8_t -
>>> which didn't even exist in C90 - but "signed char" does, so
>>> let's say that was used.
>>>
>> Yes - so what? People declare variables of all kinds of types.
>
> For what reason would people be declaring an integral
> type int8_t? I've never felt the need to do that. I just
> use "int" and expect that to be portable.

I use "int" where "int" is appropriate, and "int8_t" and whatever that
suits. And I expect both to be portable, with the exception of
specialist devices such as some DSP's that don't have 8-bit (and maybe
not even 16-bit) types.

Usually a type such as "int8_t" has three main uses. One is if you are
working on 8-bit processors. Another is if you have large arrays, or
arrays of structs, and want compact storage of small data types. The
third is to match fixed structures such as file formats, network packet
formats, or hardware registers.

>
> When you're programming on an x64 how often do you
> code int8_t?

I very rarely write code in C for x86-64. But if I needed a big array
of small numbers, I'd use int8_t (or uint8_t, or whatever was suitable).

> I bet people are coding int8_t when they're
> about to build an 8080 program because they know
> what the immediate resource constraints are and are
> basically writing non-portable code.
>

Nobody writes code for 8080 devices any more, nor have they done so for
decades. But people /do/ write C code for 8-bit devices, and then
int8_t will turn up regularly.

> I guess that's an underlying assumption I failed to mention.
>
> I'm trying to write portable code, even for my operating
> system code (obviously with the exception of some
> minimal assembler).

Portable to what? It is extremely rare to have to make code portable to
/any/ architecture with a C implementation. Often you can make
reasonable assumptions that hold true for all the targets you are
interested in. (And often these assumptions are not actually needed in
order to write good code.)

>
>> And C99 became standard a generation ago - it's okay to use it.
>
> Cobol was a standard in various years too. It's OK to use
> that too.
>

Use Cobol where Cobol is appropriate. For C programming, there are
almost no systems that are in use today that do not have C99 toolchains.
(Even MSVC supports almost all C99 now.) The <stdint.h> types are
available in most pre-C99 toolchains too.

> My question is about C90. That is the language I know
> and wish to use.
>

OK. Write a version of <stdint.h> for whatever ancient toolchain you
have managed to dig up, and we are back to using int8_t and other
standard types.

> One day I may rewrite my entire C90 OS and toolchain
> in Pascal or Turtle Graphics, but I haven't completed
> C90 yet.
>
>>> I normally don't define such a narrow type. I was "taught"
>>> to define variables as "int" unless you have a good reason
>>> to do otherwise, and let it match the natural word size
>>> (which is why I expect "int" to be 64-bit on an x64).
>
>> You were taught badly - or at least, badly outdated. A better rule is
>> to use the appropriate type for the task.
>
> This is a conceptual change to give a new language.

No, it is standard practice for all programming languages ever made (at
least, those with types). It is not a "conceptual change" to suggest
using a screwdriver for screws, rather than always using a hammer.

>
> I'm not saying that it's right or wrong (I'm not claiming to
> be a language expert). I'm just saying that it's not the
> language I am currently programming in, and my question
> is about C90. Or possibly K&R C 1. ie the original intent
> of the language.
>

Even pre K&R1 C had more than one type.

> I am exploring what Ritchie had in mind. I am willing to
> change it if I find a place where Ritchie was "obviously"
> insane, but so far I haven't found anything wrong at all.
>

Ritchie was smart enough to use modern tools, modern languages, and
modern programming techniques - and if they were not good enough, he
made new ones. The idea of using C90 today, or 8080 processors, or
sticking to "int" as your only type, is about as far from Ritchie's
mindset as you can get.

>> "int" is often a reasonable enough choice when you can't think of
>> anything better, and you are only working with small numbers (up to
>> 16-bit) or know the platform must be 32-bit int minimum (maybe your code
>> is full of POSIX calls), and you are not storing a lot of them (you
>> don't want to waste cache space with big arrays of "int" when uint8_t
>> would have sufficed), and you don't need maximal speed for local
>> variables on 64-bit targets.
>
> It is not that I will "only be working with small numbers".
> It is that I am expecting the program to adapt to - and
> have the same limitations as - the target machine, not
> the source code.
>
> So if I have a calculator program, I expect to be able to add
> up numbers to 2**31 on a 32-bit machine and up to 127 on
> the 8080. If my "users" (ie me) doesn't like that, then they
> should upgrade processor.
>

You expect incorrectly. "int" is never smaller than 16-bit.

But it is not unreasonable to let the limits for some things depend on
the architecture.

> A calculator is not a particularly good example. The number
> of arguments to main() would be a better example.
>
>>> I don't even use "short" - never had a reason to.
>
>> "short" is also /long/ outdated, IMHO. Use types that say what you
>> mean. "short" really doesn't say anything at all, and has no guarantees
>> that "int" does not also have.
>
> And what I normally mean is "adapt to the target machine's
> natural word size as Ritchie said (as far as I know that's what
> he said)".

Except "int" does not do that, at least not entirely. It does not adapt
to anything smaller than 16 bits, and on most 64-bit architectures, it
is implemented as 32-bit.

>
> Unless I'm dealing with files, and then I use "long", as C90 says.
>
>> "int" says "at least 16-bits, and a reasonably efficient local type for
>
> It didn't say that in K&R 1 and I am questioning the ANSI
> committee's decision to put a constraint there.
>

K&R 1 gave a list of sizes for different machines, with 16-bit as the
smallest for "int". K&R 2 made "int" a minimum size of 16 bits,
predating the ANSI standard publication (though I have no idea who made
the decision about it).

I have never heard of any C implementation that considered itself
remotely standard (even "K&R 1 standard") that had int smaller than
16-bit. Maybe others have heard of such systems.

> Maybe they figured that no-one would ever program
> for the 8080 again so no-one will complain.
>

The 8080 was discontinued in 1990, while K&R 2 was published in 1988.
The 8080 had therefore been long surpassed by other devices by then.
However, other 8-bit devices were extremely common at the time, and are
still in common use. There is no reason to suppose the 8080 in
particular was remotely relevant to either the ANSI C committee, or the
K&R authors or editors. Both groups were fully aware of the importance
of 8-bit systems at the time.

> That was an incorrect assumption.
>

If they assumed that no one (baring a small handful of enthusiasts)
would program 8080 devices again, they'd have been right. But I doubt
they even considered it.

>>> I don't think K & R 1 specified a minimum size for "int".
>>>
>> I believe they specified it had to be at least -32767 to 32767 in range,
>> but I don't have a copy of the book handy.
>
> I believe that is wrong, and was answered a month ago
> or something. I was expecting someone else to confirm
> that before I replied.
>

I have looked, at it was not until the second edition that a minimum
range was specified. In the first edition, only example sizes were
given, with 16-bit being the smallest.

>> Regardless, K&R C is as relevant as ancient Latin - great for historical
>> interest, but not for any real-world coding done today.
>
> I'm not necessarily doing what you call "real-world coding".
>


Click here to read the complete article
Re: PL/M

<b3441bb5-9bd9-4d72-b575-790493b3839an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:6891:b0:76d:72d:20c with SMTP id rv17-20020a05620a689100b0076d072d020cmr19172qkn.14.1691665408862;
Thu, 10 Aug 2023 04:03:28 -0700 (PDT)
X-Received: by 2002:a05:6a00:2d8d:b0:687:4ed6:ec12 with SMTP id
fb13-20020a056a002d8d00b006874ed6ec12mr966427pfb.3.1691665408550; Thu, 10 Aug
2023 04:03:28 -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, 10 Aug 2023 04:03:27 -0700 (PDT)
In-Reply-To: <c06ae02b-74c4-4a12-a094-7d0bbdf18895n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.32; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.32
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<621b184d-8311-45c4-ab68-9cc83febed87n@googlegroups.com> <ed3ae7fd-877a-4d9f-88db-940299128fbcn@googlegroups.com>
<c06ae02b-74c4-4a12-a094-7d0bbdf18895n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b3441bb5-9bd9-4d72-b575-790493b3839an@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 10 Aug 2023 11:03:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3876
 by: Paul Edwards - Thu, 10 Aug 2023 11:03 UTC

Sorry for the delay - I was sick - possibly Covid as it had
symptoms I wasn't used to - plus had some other priorities.

> Looking at your other posts I now understand that you want a
> couple of things--
> ONE: a C standard language that is usable from what I'll call
> server/mainframe class processors (64bit)
> down to
> utility class processors (8bit).
> Note: glad to see you are not asking to include 4 bit processors!
>
> TWO: the ability to write an Operating system in that standard
> C language that is portable from utility class to server class
> hardware.
>
> Sorry but you hit a key limit of the C language. I doubt ANY
> language can meet both of those goals at the same time.

That's what I'm trying to understand.

Note that I have 16-bit to 64-bit already done.

I didn't notice any limitation in the language.

> Just consider GNU/LINUX. Even though the LINUX kernel
> is is available on many processors and platforms, these
> are all a minimum of 32bit processors. And the source code
> is not portable in the sense that it had compile conditionals
> to modify the code as needed for the target hardware.

They probably aren't using the PDOS-generic model
which is what I am now using.

> May I ask, are you skilled in assembly language?
> For which processors?

I know/used 6502, x86 and S/370 assembler.

I'm not claiming to be an expert. I program almost
exclusively in C90.

> On the 6502 did you program at the low level, bare hardware?
> Or within a defined environment (like a commadore64)?

On the C64.

> > Yes, you can use some tricks to reduce space, but I don't
> > want to take away the design simplicity, so my solution
> > is to switch to the 80286 so that I have 2 MB. I haven't
> > done that yet though.

> So which target are you programming for, 8bit or 32 bit?

The 80286 is 16-bit register size.

But right at the moment I have switched to 64-bit because
someone contributed some 64-bit code and I am utilizing
that as priority.

BFN. Paul.

Re: PL/M

<259b3264-1c89-406d-be8b-2ac50ce6487en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:1747:b0:63c:eda9:400a with SMTP id dc7-20020a056214174700b0063ceda9400amr21568qvb.1.1691665912604;
Thu, 10 Aug 2023 04:11:52 -0700 (PDT)
X-Received: by 2002:a63:a742:0:b0:55a:12cf:3660 with SMTP id
w2-20020a63a742000000b0055a12cf3660mr389024pgo.1.1691665912088; Thu, 10 Aug
2023 04:11:52 -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, 10 Aug 2023 04:11:51 -0700 (PDT)
In-Reply-To: <8cb3732f-e0b8-41af-82c3-db6685c257d6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.32; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.32
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<ua1l1v$2chh1$1@dont-email.me> <3d83c7b4-0110-4b68-a061-fcba0f878c9an@googlegroups.com>
<8cb3732f-e0b8-41af-82c3-db6685c257d6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <259b3264-1c89-406d-be8b-2ac50ce6487en@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 10 Aug 2023 11:11:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2524
 by: Paul Edwards - Thu, 10 Aug 2023 11:11 UTC

On Monday, July 31, 2023 at 12:12:09 PM UTC+8, Ed Prochak wrote:

> Okay. I am trying to make sure I don't offend you here,
> but
> you do know that the OBJ file contains more than the
> executable code and that even the code it contains
> may not be in binary format,
> RIGHT?

Yes, I know that, but it's mostly binary code and
here is the fat code in the PDOS/86 kernel:

fat_TEXT CODE AUTO 33f2:0000 0000b222

45602 bytes. Compiled with Open Watcom.

I checked the disassembly - it is all legitimate code.

It could be the price of the huge memory model, which I
wouldn't encounter on the 8080.

BFN. Paul.

Re: PL/M

<3a6b4be6-794f-41f6-9ab2-ccdc1cdf6945n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:9c7:b0:76d:473:2e74 with SMTP id y7-20020a05620a09c700b0076d04732e74mr22167qky.6.1691666549616;
Thu, 10 Aug 2023 04:22:29 -0700 (PDT)
X-Received: by 2002:a63:79cf:0:b0:563:9b68:cf59 with SMTP id
u198-20020a6379cf000000b005639b68cf59mr469770pgc.8.1691666549010; Thu, 10 Aug
2023 04:22:29 -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, 10 Aug 2023 04:22:28 -0700 (PDT)
In-Reply-To: <uabvfm$3pcm5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.32; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.32
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> <e144f59d-ed63-48ce-8258-56ce94b0294an@googlegroups.com>
<u9tl55$1sajh$1@dont-email.me> <432c17a3-8e76-4829-8eec-90c29bc8d421n@googlegroups.com>
<u9tsah$1svth$1@dont-email.me> <7dca77f3-778a-4281-9bdb-a6dfe734042en@googlegroups.com>
<uabvfm$3pcm5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3a6b4be6-794f-41f6-9ab2-ccdc1cdf6945n@googlegroups.com>
Subject: Re: PL/M
From: mutazi...@gmail.com (Paul Edwards)
Injection-Date: Thu, 10 Aug 2023 11:22:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3131
 by: Paul Edwards - Thu, 10 Aug 2023 11:22 UTC

On Wednesday, August 2, 2023 at 6:03:47 AM UTC+8, David Brown wrote:

> Portable to what? It is extremely rare to have to make code portable to
> /any/ architecture with a C implementation.

It's not "have to", it's "want to". I didn't "have to" write
PDOS at all. Well, there could be room for a semantic
debate there, but I'm not interested in that.

> > And C90 is hugely superior to SubC, and I'm still waiting
> > for that gap to be closed.
> >
> I have no idea what "SubC" might be. But if someone says lasagne makes
> a nicer diner than plain bread, saying plain bread is nicer than eating
> rocks does not count as a reason for turning down the lasagne.

There is no public domain lasagne. Just public domain rocks.

> > Writing an application, writing an OS, and writing a compiler
> > are independent tasks.
> >
> And each is perhaps 5 orders of magnitude more effort than writing a
> little C++ class.

And I am doing the OS task above, and someone else is
doing the compiler task above.

> You have doubts that when people write "int8_t", they mean "an eight bit
> signed integer type" ?

I have doubts that that translates to a business requirement
or a logical need.

BFN. Paul.


devel / comp.lang.c / Re: PL/M

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor