Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The bogosity meter just pegged.


devel / comp.os.cpm / Compatibility between CP/M 2.2 systems

SubjectAuthor
* Compatibility between CP/M 2.2 systemsMartin
+* Re: Compatibility between CP/M 2.2 systemsDouglas Miller
|`* Re: Compatibility between CP/M 2.2 systemsMartin
| `- Re: Compatibility between CP/M 2.2 systemsDouglas Miller
`* Re: Compatibility between CP/M 2.2 systemsdxforth
 `- Re: Compatibility between CP/M 2.2 systemsMartin

1
Compatibility between CP/M 2.2 systems

<uaedms$943b$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4351&group=comp.os.cpm#4351

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: martin.d...@mailbox.org (Martin)
Newsgroups: comp.os.cpm
Subject: Compatibility between CP/M 2.2 systems
Date: Wed, 2 Aug 2023 22:18:32 +0200
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <uaedms$943b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 2 Aug 2023 20:18:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="08f15516855d54b26975e567197166e3";
logging-data="299115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+Ek321zuKGcq/9RL3M/H+"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+M34eJ8nq/fFoFplg0w/gNYndpw=
Content-Language: en-US
 by: Martin - Wed, 2 Aug 2023 20:18 UTC

Hi. I'm totally new to CP/M. I'm asking myself a question: What would I
need to take into account to enshure, that a program developed for/on
one CP/M 2.2 system will run on another?

Say, I'd develop on Linux/RunCpm with 60 K of free RAM and have another
Z80-MBC with 56 K. Is this a problem? The code is not position
independant? What do I need to take care of?

Thanks in advance
Martin

Re: Compatibility between CP/M 2.2 systems

<dac82af7-a654-49f8-aa93-841d05bb023bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4352&group=comp.os.cpm#4352

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:1887:b0:403:b014:538f with SMTP id v7-20020a05622a188700b00403b014538fmr86725qtc.10.1691009770402;
Wed, 02 Aug 2023 13:56:10 -0700 (PDT)
X-Received: by 2002:a05:6870:1a88:b0:1bb:c397:ed98 with SMTP id
ef8-20020a0568701a8800b001bbc397ed98mr17854696oab.3.1691009770055; Wed, 02
Aug 2023 13:56:10 -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.os.cpm
Date: Wed, 2 Aug 2023 13:56:09 -0700 (PDT)
In-Reply-To: <uaedms$943b$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=96.42.194.246; posting-account=5XW4vgoAAADMD8xScYja8bdzAXoYQrTS
NNTP-Posting-Host: 96.42.194.246
References: <uaedms$943b$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dac82af7-a654-49f8-aa93-841d05bb023bn@googlegroups.com>
Subject: Re: Compatibility between CP/M 2.2 systems
From: durgadas...@gmail.com (Douglas Miller)
Injection-Date: Wed, 02 Aug 2023 20:56:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2316
 by: Douglas Miller - Wed, 2 Aug 2023 20:56 UTC

Generally, you want to use only BDOS calls (no direct-BIOS calls) in order to remain compatible. In addition, you should not make any assumptions about the amount of available memory, or at least check your memory requirements against the "top of memory" address embedded in the BDOS entry JMP at location 0005H. You also don't want to directly access any hardware or make assumptions about the hardware configuration (possibly even including avoiding any terminal screen (ESC) codes, or else providing a mechanism to configure the program for different terminal types). Programs always run at location 0100H, so the code need not be position-independent or relocatable (unless you need that for the program itself).

For the file access BDOS calls, you should avoid manipulating the FCB, at least stay away from the fields called-out in the CP/M Programmer's Guide as being used internally or using fields in a way not defined in the manual. The FCBs must be initialized correctly for OPEN, MAKE, DELETE, RENAME, but otherwise one should generally not touch them (with the possible exception of the CR and random record number fields at the end).

Re: Compatibility between CP/M 2.2 systems

<uaf4u0$g500$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4354&group=comp.os.cpm#4354

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.os.cpm
Subject: Re: Compatibility between CP/M 2.2 systems
Date: Thu, 3 Aug 2023 12:54:56 +1000
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uaf4u0$g500$1@dont-email.me>
References: <uaedms$943b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 3 Aug 2023 02:54:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="18510595855dac202a9d679d35803752";
logging-data="529408"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OsIBqONOp5D4C6uhpok+f"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:V54TfwKNUm/Zd0/ZXanQ3MwB0mE=
In-Reply-To: <uaedms$943b$1@dont-email.me>
Content-Language: en-GB
 by: dxforth - Thu, 3 Aug 2023 02:54 UTC

On 3/08/2023 6:18 am, Martin wrote:
> Hi. I'm totally new to CP/M. I'm asking myself a question: What would I need to take into account to enshure, that a program developed for/on one CP/M 2.2 system will run on another?
>
> Say, I'd develop on Linux/RunCpm with 60 K of free RAM and have another Z80-MBC with 56 K. Is this a problem? The code is not position independant? What do I need to take care of?

CP/M was written for the 8080. Depending on the intended audience you may wish to avoid
using Z80-specific instructions.

Re: Compatibility between CP/M 2.2 systems

<uafakr$gudb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4356&group=comp.os.cpm#4356

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: martin.d...@mailbox.org (Martin)
Newsgroups: comp.os.cpm
Subject: Re: Compatibility between CP/M 2.2 systems
Date: Thu, 3 Aug 2023 06:32:24 +0200
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <uafakr$gudb$1@dont-email.me>
References: <uaedms$943b$1@dont-email.me> <uaf4u0$g500$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 3 Aug 2023 04:32:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3e15aec4abec97ce84c32312f386427";
logging-data="555435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BP56jyyVuOt3925ksHx88"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:PG4csvpbtyDCKgHP6zlDDpYR+SM=
In-Reply-To: <uaf4u0$g500$1@dont-email.me>
Content-Language: en-US
 by: Martin - Thu, 3 Aug 2023 04:32 UTC

Am 03.08.23 um 04:54 schrieb dxforth:
> CP/M was written for the 8080. Depending on the intended audience you may wish to avoid
> using Z80-specific instructions.
>
Ok, this will not be that important for me, because I plan to have them
running on Z80 hardware or emulations only. Though, all my code, mainly
in C, was always be open source. So it can be compiled on other
processor architectures too, if needed.

At first CP/M code will be experiments and getting familiar with the
platform.

Re: Compatibility between CP/M 2.2 systems

<uafb17$gudb$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4357&group=comp.os.cpm#4357

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: martin.d...@mailbox.org (Martin)
Newsgroups: comp.os.cpm
Subject: Re: Compatibility between CP/M 2.2 systems
Date: Thu, 3 Aug 2023 06:39:01 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uafb17$gudb$2@dont-email.me>
References: <uaedms$943b$1@dont-email.me>
<dac82af7-a654-49f8-aa93-841d05bb023bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 3 Aug 2023 04:39:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b3e15aec4abec97ce84c32312f386427";
logging-data="555435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HldRxLg+BWB4UrGKfGaiI"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IOAo3JdTVcpZuMnN/XhAtrW3WlI=
Content-Language: en-US
In-Reply-To: <dac82af7-a654-49f8-aa93-841d05bb023bn@googlegroups.com>
 by: Martin - Thu, 3 Aug 2023 04:39 UTC

Am 02.08.23 um 22:56 schrieb Douglas Miller:
> Programs always run at location 0100H, so the code need not be position-independent or relocatable (unless you need that for the program itself).
>
Ah, great. So it seems, that this was the most unknown/important point
for me. So if only using BDOS, not manipulating the FCB after
initialization and using standard vt100 capabilities should produce
portable executables than.

There is no terminal abstraction layer, like termcap/terminfo or such?

Re: Compatibility between CP/M 2.2 systems

<a4b6ca05-4e29-42b5-85b1-1915d370adaan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4359&group=comp.os.cpm#4359

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:15d0:b0:40f:dc70:fddb with SMTP id d16-20020a05622a15d000b0040fdc70fddbmr33188qty.10.1691061971147;
Thu, 03 Aug 2023 04:26:11 -0700 (PDT)
X-Received: by 2002:a05:6870:7707:b0:1bb:576c:7397 with SMTP id
dw7-20020a056870770700b001bb576c7397mr19002624oab.11.1691061970485; Thu, 03
Aug 2023 04:26:10 -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.os.cpm
Date: Thu, 3 Aug 2023 04:26:09 -0700 (PDT)
In-Reply-To: <uafb17$gudb$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=96.42.194.246; posting-account=5XW4vgoAAADMD8xScYja8bdzAXoYQrTS
NNTP-Posting-Host: 96.42.194.246
References: <uaedms$943b$1@dont-email.me> <dac82af7-a654-49f8-aa93-841d05bb023bn@googlegroups.com>
<uafb17$gudb$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a4b6ca05-4e29-42b5-85b1-1915d370adaan@googlegroups.com>
Subject: Re: Compatibility between CP/M 2.2 systems
From: durgadas...@gmail.com (Douglas Miller)
Injection-Date: Thu, 03 Aug 2023 11:26:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2105
 by: Douglas Miller - Thu, 3 Aug 2023 11:26 UTC

On Wednesday, August 2, 2023 at 11:39:05 PM UTC-5, Martin wrote:
> Ah, great. So it seems, that this was the most unknown/important point
> for me. So if only using BDOS, not manipulating the FCB after
> initialization and using standard vt100 capabilities should produce
> portable executables than.
>
> There is no terminal abstraction layer, like termcap/terminfo or such?

CP/M did not have any standard terminal abstraction. Each app tended to do things differently. FYI, VT100 was not a very common terminal on CP/M machines. If your expected audience is users running terminal programs on their modern PC, then it's not a problem.

If you are using a HLL like C, you should not have too much problem remaining compatible unless you are adding ASM routines/code - in which case you just have to avoid dependencies on specific hardware.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor