Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

building cpm3 system from sources

303 views
Skip to first unread message

retrogear

unread,
Sep 18, 2013, 7:34:07 AM9/18/13
to
Has anyone ever put together all the pieces to build the entire cpm3 os from sources? I had been working on a master batch file to assemble it in one shot using a DOS batch file. Some parts had already been done using the zxcc emulator and I've found some work better with the cpm player by Mr Takeda Toshiya. Is there interest in this? I don't want to re-invent the wheel if it has already been done. All the discussion about adapting cpm3.sys and serializing the os got me interested again...

Larry

Roger Ivie

unread,
Sep 18, 2013, 11:15:13 AM9/18/13
to
On 2013-09-18, retrogear <larry...@gmail.com> wrote:
> Has anyone ever put together all the pieces to build the entire cpm3
> os from sources?

Udo Munk has done it for his z80pack simulator.

http://www.autometer.de/unix4fun/z80pack/

In particular, scroll down to "CP/M 3 source disk images for Z80SIM
with build scripts".
--
roger ivie
ri...@ridgenet.net

retrogear

unread,
Sep 18, 2013, 12:50:33 PM9/18/13
to
Has anyone ever put together all the pieces to build the entire cpm3 > os from sources? Udo Munk has done it for his z80pack simulator. http://www.autometer.de/unix4fun/z80pack/ In particular, scroll down to "CP/M 3 source disk images for Z80SIM with build scripts". -- roger ivie

Those are the "pieces" I was referencing. What I'm working on is a one shot build all that runs all those .sub scripts and more. I will look through what he has too. Mine would build it all from one DOS batch file outside of cp/m. If I remember right some of it can't be done inside cp/m because it involves the isis system.

Larry

Steve Nickolas

unread,
Sep 18, 2013, 3:16:00 PM9/18/13
to
On Wed, 18 Sep 2013, retrogear wrote:

> Those are the "pieces" I was referencing. What I'm working on is a one
> shot build all that runs all those .sub scripts and more. I will look
> through what he has too. Mine would build it all from one DOS batch file
> outside of cp/m. If I remember right some of it can't be done inside
> cp/m because it involves the isis system.
>
> Larry
>

There's Jim Lopushinsky's cpm.exe and z80.cmd that would theoretically run
CP/M 3.1 apps under MS-DOS...

-uso.

retrogear

unread,
Sep 18, 2013, 5:14:24 PM9/18/13
to
On Wednesday, September 18, 2013 2:16:00 PM UTC-5, Steve Nickolas wrote:

> There's Jim Lopushinsky's cpm.exe and z80.cmd that would theoretically run CP/M 3.1 apps under MS-DOS... -uso.

Thanks - I'll test those too.

Larry

retrogear

unread,
Sep 18, 2013, 5:34:01 PM9/18/13
to
On Wednesday, September 18, 2013 4:14:24 PM UTC-5, retrogear wrote:
> On Wednesday, September 18, 2013 2:16:00 PM UTC-5, Steve Nickolas wrote: > There's Jim Lopushinsky's cpm.exe and z80.cmd that would theoretically run CP/M 3.1 apps under MS-DOS... -uso. Thanks - I'll test those too. Larry

Although using CP/M 3 to build CP/M 3 is kind of the chicken and egg problem :)

Larry

Peter Dassow

unread,
Sep 18, 2013, 5:45:09 PM9/18/13
to
I've done this for a Commodore 128, see http://www.z80.eu/c128.html ...

Regards Peter

monah...@gmail.com

unread,
Sep 18, 2013, 5:56:29 PM9/18/13
to

John Elliott

unread,
Sep 18, 2013, 6:41:57 PM9/18/13
to
The 'developer's build directory for CP/M 3' at
<http://www.cpm.z80.de/source.html> was my build directory under DRDOS;
rather than a master batch file, it uses GNU Make to build everything.
The next line down is one where the build scripts and emulators are for
Linux rather than DRDOS.

--
John Elliott

Thinks: This is what a nice clean life leads to. Hmm, why did I ever lead one?
-- Bluebottle, in the Goon Show

retrogear

unread,
Sep 18, 2013, 10:01:45 PM9/18/13
to
Hmmm - All the binaries I'm producing have a header:

CP/M Version 3.0 COPYRIGHT 1982, DIGITAL REASEARCH 151282

but all the binaries I'm finding on the 'net are a mixed bag with headers like Caldera 1998, etc. I was hoping to do a byte comparison for accuracy. Was any original DRI binaries preserved somewhere? My batch file is producing a crapperload of files that I'd like to check on.

Larry

retrogear

unread,
Sep 19, 2013, 10:05:50 PM9/19/13
to
On Wednesday, September 18, 2013 9:01:45 PM UTC-5, retrogear wrote:
> Hmmm - All the binaries I'm producing have a header:
> CP/M Version 3.0 COPYRIGHT 1982, DIGITAL REASEARCH 151282
>My batch file is producing a crapperload of files that I'd like to check on.


The part that has me stumped is a submit file to create the cpm3 serializer utility: ser30gen.sub (listed below)

pli rootcopy
pli seri-dum
pli seri-002
link ser30=rootcopy,plibios3,plidio[a](seri-dum[L57C0])
link rootcopy[a,$$oz],plibios3,plidio(seri-002[$$oa,l57c0])

It assembles until the last line then errors on the $$ expression.
Does anyone know what the $$oz or $$oa represent?

Larry

Jeffrey W. Shook

unread,
Sep 19, 2013, 11:38:52 PM9/19/13
to
Hello Larry,

According to the CP/M 2.2 manual in the file cpm22-m.pdf, on page 1-39
it is the following:

To introduce dollar signs into a SUBMIT file, you can type
a $$ which reduces to a single $ within the command file.
An up arrow, ^|, precedes an alphabetic character s, which
produces a single CTRL-X character within the file.

Thus the line

link rootcopy[a,$$oz],plibios3,plidio(seri-002[$$oa,l57c0])

should be passed to the linker as

link rootcopy[a,$oz],plibios3,plidio(seri-002[$oa,l57c0])

to set the linker options which start with a $ character.

Jeffrey W. Shook


Ed

unread,
Sep 20, 2013, 12:04:29 AM9/20/13
to
retrogear wrote:
> Hmmm - All the binaries I'm producing have a header:
>
> CP/M Version 3.0 COPYRIGHT 1982, DIGITAL REASEARCH 151282
>
> but all the binaries I'm finding on the 'net are a mixed bag with headers like Caldera 1998,
> etc. I was hoping to do a byte comparison for accuracy. Was any original DRI binaries
> preserved somewhere?

With or without the DRI patches :)

The official sources (and consequently the binaries produced) won't include the official
DRI SID-entered patches. There have been attempts by third parties to include the patches
in the source but I don't know if it results in a byte-identical image with officially patched
binaries.

What would be useful is a permanent fix for the DRI CP/M 3 random-read bug - which
DRI was informed about but never addressed (?). An RSX that works around the bug
can be found in CPM3BUG.LBR
http://archives.scovetta.com/pub/walnut-creek/BEEHIVE/TESERACT/TESS-047.ZIP
Text explaining when/why the bug occurs is included with ZPM3 - but sadly no detail
as to how they fixed it.

A simple executable which tests whether you have the random-read bug is here:
http://dxforth.webhop.org/rrbug.zip




retrogear

unread,
Sep 20, 2013, 7:09:56 AM9/20/13
to

> > The part that has me stumped is a submit file to create the cpm3 serializer utility: ser30gen.sub (listed below)
>
> > pli rootcopy
> > pli seri-dum
> > pli seri-002
> > link ser30=rootcopy,plibios3,plidio[a](seri-dum[L57C0])
> > link rootcopy[a,$$oz],plibios3,plidio(seri-002[$$oa,l57c0])
>
> > It assembles until the last line then errors on the $$ expression.
> > Does anyone know what the $$oz or $$oa represent?
>
> > Larry
>

> Hello Larry,
>
> According to the CP/M 2.2 manual in the file cpm22-m.pdf, on page 1-39
> it is the following:

> To introduce dollar signs into a SUBMIT file, you can type
> a $$ which reduces to a single $ within the command file.
> An up arrow, ^|, precedes an alphabetic character s, which
> produces a single CTRL-X character within the file.

> Thus the line

> link rootcopy[a,$$oz],plibios3,plidio(seri-002[$$oa,l57c0])
> should be passed to the linker as

> link rootcopy[a,$oz],plibios3,plidio(seri-002[$oa,l57c0])
> to set the linker options which start with a $ character.

> Jeffrey W. Shook

Thanks - changing $$ to $ now gives me this output:

C:\makecpm3>cpm pli rootcopy

PL/I-80 V1.3 COMPILATION OF: ROOTCOPY

NO ERROR(S) IN PASS 1

NO ERROR(S) IN PASS 2


CODE SIZE = 1335
DATA AREA = 0740
FREE SYMS = 32C7
END COMPILATION

C:\makecpm3>cpm pli seri-dum


PL/I-80 V1.3 COMPILATION OF: SERI-DUM


NO ERROR(S) IN PASS 1

NO ERROR(S) IN PASS 2


CODE SIZE = 0001
DATA AREA = 2800
FREE SYMS = 563C
END COMPILATION

C:\makecpm3>cpm pli seri-002


PL/I-80 V1.3 COMPILATION OF: SERI-002


NO ERROR(S) IN PASS 1

NO ERROR(S) IN PASS 2


CODE SIZE = 0680
DATA AREA = 043E
FREE SYMS = 4C5F
END COMPILATION

C:\makecpm3>cpm link.com ser30=rootcopy,plibios3,plidio[a](seri-dum[L57C0])
LINK 1.31


PLILIB RQST PROD_R 0100 /SRCE_D/ 43EB /DEST_D/ 43EC
/DEBUG_/ 43ED /SEC_PE/ 43EE /COPY_I/ 43F0 /SERI_I/ 43F1
/ORG_NU/ 43F2 /SER_NU/ 43F4 /PRODUC/ 43F6 /SECTOR/ 441D
CURDSK 15F7 RESET 15A0 SELECT 15A5 DBUFF 1521
SELDSK 1469 SECTRN 1475 GETDPB 1624 ALLVEC 1604
ALLWDS 16DA SETTRK 1440 BSTDMA 1489 SETSEC 144C
RDSEC 1458 WRSEC 145D MAXWDS 1690 MEMPTR 14FC
MEMSIZ 1500 MEMWDS 150E DFCB0 1519 DFCB1 151D
REBOOT 1525 RDCON 1528 WRCON 152D RDRDR 1532
WRPUN 153D WRLST 1542 CONINP 154A CONOUT 155C
RDSTAT 1568 GETIO 1574 SETIO 1579 WRSTR 1581
RDBUF 1589 BREAK 1591 VERS 159B OPEN 15AD
CLOSE 15B5 SEAR 15BD SEARN 15C5 DELETE 15CA
RDSEQ 15D2 WRSEQ 15DA MAKE 15E2 RENAME 15EA
LOGVEC 15F2 SETDMA 15FC WPDISK 1609 ROVEC 1611
FILATT 1619 GETUSR 162C SETUSR 1636 RDRAN 1641
WRRAN 164C FILSIZ 1657 SETREC 1662 RESDRV 166D
WRRANZ 1678 SGSCB 1683 TOTWDS 168B STKSIZ 16E6
/SYSIN/ 448C /SYSPRI/ 44B1

UNDEFINED SYMBOLS:

DUMMY BFLUSH

ABSOLUTE 0000
CODE SIZE 42DC (0100-43DB)
DATA SIZE 0ACA (44FF-4FC8)
COMMON SIZE 0123 (43DC-44FE)
USE FACTOR 46


LINKING SERI-DUM.OVL

PLILIB RQST SERIAL 57C0

ABSOLUTE 0000
CODE SIZE 0001 (57C0-57C0)
DATA SIZE 2800 (57C1-7FC0)
COMMON SIZE 0000
USE FACTOR 10

MODULE TOP 8000

C:\makecpm3>cpm link.com rootcopy[a,$oz],plibios3,plidio(seri-002[$oa,l57c0])
LINK 1.31


PLILIB RQST PROD_R 0100 /SRCE_D/ 43EB /DEST_D/ 43EC
/DEBUG_/ 43ED /SEC_PE/ 43EE /COPY_I/ 43F0 /SERI_I/ 43F1
/ORG_NU/ 43F2 /SER_NU/ 43F4 /PRODUC/ 43F6 /SECTOR/ 441D
CURDSK 15F7 RESET 15A0 SELECT 15A5 DBUFF 1521
SELDSK 1469 SECTRN 1475 GETDPB 1624 ALLVEC 1604
ALLWDS 16DA SETTRK 1440 BSTDMA 1489 SETSEC 144C
RDSEC 1458 WRSEC 145D MAXWDS 1690 MEMPTR 14FC
MEMSIZ 1500 MEMWDS 150E DFCB0 1519 DFCB1 151D
REBOOT 1525 RDCON 1528 WRCON 152D RDRDR 1532
WRPUN 153D WRLST 1542 CONINP 154A CONOUT 155C
RDSTAT 1568 GETIO 1574 SETIO 1579 WRSTR 1581
RDBUF 1589 BREAK 1591 VERS 159B OPEN 15AD
CLOSE 15B5 SEAR 15BD SEARN 15C5 DELETE 15CA
RDSEQ 15D2 WRSEQ 15DA MAKE 15E2 RENAME 15EA
LOGVEC 15F2 SETDMA 15FC WPDISK 1609 ROVEC 1611
FILATT 1619 GETUSR 162C SETUSR 1636 RDRAN 1641
WRRAN 164C FILSIZ 1657 SETREC 1662 RESDRV 166D
WRRANZ 1678 SGSCB 1683 TOTWDS 168B STKSIZ 16E6
/SYSIN/ 448C /SYSPRI/ 44B1

UNDEFINED SYMBOLS:

DUMMY BFLUSH

ABSOLUTE 0000
CODE SIZE 42DC (0100-43DB)
DATA SIZE 0ACA (44FF-4FC8)
COMMON SIZE 0123 (43DC-44FE)
USE FACTOR 46


LINKING SERI-002.OVL
COMMON ERROR

** end of listing **

(I'm running this as a DOS batch with cpm or zxcc at beginning of each line.)

using Mr. Takeda's cpm player gives me the 'COMMON ERROR' message.
using the zxcc emulator gives me 'NO SPACE'.

I think I'm dealing with an out of memory condition?
What is the COMMON memory allocation?
Any thoughts?

Larry

Mr. Emmanuel Roche, France

unread,
Sep 22, 2013, 2:16:49 PM9/22/13
to
"retrogear" wrote:

> Thanks - changing $$ to $ now gives me this output:

1)
UNDEFINED SYMBOLS:
DUMMY BFLUSH

2)
UNDEFINED SYMBOLS:
DUMMY BFLUSH

3)
LINKING SERI-002.OVL
COMMON ERROR

** end of listing **

> (I'm running this as a DOS batch with cpm or zxcc at beginning
> of each line.)

> using Mr. Takeda's cpm player gives me the 'COMMON ERROR'
> message.
> using the zxcc emulator gives me 'NO SPACE'.

> I think I'm dealing with an out of memory condition?
> What is the COMMON memory allocation?
> Any thoughts?

Hum...

The first thing to do would be, of course, to compile without
error...

So, there are 3 source files involved: ROOTCOPY, SERI-DUM, and
SERI-002.

In addition, the linker adds files PLIBIOS3 and PLIDIO.

DUMMY is mentioned in ROOTCOPY.PLI as being:

overlay:
/* used to call .OVL file which has been loaded */
proc(name);
dcl
?ovlay entry(char(10), fixed bin(1)),
dummy entry,
name char(10);
call ?ovlay(name,0);
call dummy;
end overlay;

Is there any PL/I programmer, out there, who could explain why
the linker generates this error?

As for BFLUSH, it is present in PLIBIOS, the interface for CP/M
2.2:

public bflush ;flush deblocking buffers
;
bflush: ;flush deblocking buffers
; lxi b,0ffffh
; lxi d,setdmf
; jmp gobios
ret

but was neutralized to be simply a RETurn, so you can safely
remove it from the PLI source code.

(I suspect that, when they created the CP/M Plus version, they
re-used the CP/M 2.2 version, and forgot to modify the SUB
file.)

Now for the COMMON error.

The problem is that "COMMON" has many different meaning,
depending on History. As far as I know, it comes from FORTRAN
(is there any FORTRAN programmer out there who could confirm
this?). Under CP/M Plus, this is the region of RAM which remains
in the TPA, no matter which "bank" of RAM you select.

I think that you can safely translate this by "overlay", which
brings us back to the first undefined symbol, DUMMY, which is
precisely an overlay...

If I were you,I would first correct the BFLUSH bug, and see what
happens. (Did you do the CP/M 2.2 version first? Did it compile
and link without any problem?)

Yours Sincerely,
Mr. Emmanuel Roche, France (Former COBOL programmer on IBM
Mainframes)



retrogear

unread,
Sep 22, 2013, 6:16:04 PM9/22/13
to
If I were you,I would first correct the BFLUSH bug, and see what
happens. (Did you do the CP/M 2.2 version first? Did it compile
and link without any problem?)

Yours Sincerely,
Mr. Emmanuel Roche, France (Former COBOL programmer on IBM
Mainframes)

Mr. Roche,

Doing the cp/m 2.2 version eliminated the undefined symbol BFLUSH as you predicted but I still have the undefined DUMMY and the COMMON ERROR. Here is the output:

C:\makecpm3>cpm pli rootcopy

PL/I-80 V1.3 COMPILATION OF: ROOTCOPY

NO ERROR(S) IN PASS 1
NO ERROR(S) IN PASS 2

CODE SIZE = 1335
DATA AREA = 0740
FREE SYMS = 32C7
END COMPILATION

C:\makecpm3>cpm pli seri-dum

PL/I-80 V1.3 COMPILATION OF: SERI-DUM

NO ERROR(S) IN PASS 1
NO ERROR(S) IN PASS 2

CODE SIZE = 0001
DATA AREA = 2800
FREE SYMS = 563C
END COMPILATION

C:\makecpm3>cpm pli seri-002

PL/I-80 V1.3 COMPILATION OF: SERI-002

NO ERROR(S) IN PASS 1
NO ERROR(S) IN PASS 2

CODE SIZE = 0680
DATA AREA = 043E
FREE SYMS = 4C5F
END COMPILATION

C:\makecpm3>cpm link.com ser22=rootcopy,plibios,plidio[a](seri-dum[L57C0])
LINK 1.31

PLILIB RQST PROD_R 0100 /SRCE_D/ 43E5 /DEST_D/ 43E6
/DEBUG_/ 43E7 /SEC_PE/ 43E8 /COPY_I/ 43EA /SERI_I/ 43EB
/ORG_NU/ 43EC /SER_NU/ 43EE /PRODUC/ 43F0 /SECTOR/ 4417
CURDSK 15FF RESET 15A8 SELECT 15AD DBUFF 1529
SELDSK 1440 SECTRN 146C GETDPB 162C ALLVEC 160C
ALLWDS 16E2 SETTRK 144A BSTDMA 147E SETSEC 1455
RDSEC 1460 WRSEC 1466 BFLUSH 1489 MAXWDS 1698
MEMPTR 1504 MEMSIZ 1508 MEMWDS 1516 DFCB0 1521
DFCB1 1525 REBOOT 152D RDCON 1530 WRCON 1535
RDRDR 153A WRPUN 1545 WRLST 154A CONINP 1552
CONOUT 1564 RDSTAT 1570 GETIO 157C SETIO 1581
WRSTR 1589 RDBUF 1591 BREAK 1599 VERS 15A3
OPEN 15B5 CLOSE 15BD SEAR 15C5 SEARN 15CD
DELETE 15D2 RDSEQ 15DA WRSEQ 15E2 MAKE 15EA
RENAME 15F2 LOGVEC 15FA SETDMA 1604 WPDISK 1611
ROVEC 1619 FILATT 1621 GETUSR 1634 SETUSR 163E
RDRAN 1649 WRRAN 1654 FILSIZ 165F SETREC 166A
RESDRV 1675 WRRANZ 1680 SGSCB 168B TOTWDS 1693
STKSIZ 16EE /SYSIN/ 4486 /SYSPRI/ 44AB

UNDEFINED SYMBOLS:

DUMMY

ABSOLUTE 0000
CODE SIZE 42D6 (0100-43D5)
DATA SIZE 0ACA (44F9-4FC2)
COMMON SIZE 0123 (43D6-44F8)
USE FACTOR 46

LINKING SERI-DUM.OVL

PLILIB RQST SERIAL 57C0

ABSOLUTE 0000
CODE SIZE 0001 (57C0-57C0)
DATA SIZE 2800 (57C1-7FC0)
COMMON SIZE 0000
USE FACTOR 10

MODULE TOP 8000

C:\makecpm3>cpm link.com rootcopy[a,$oz],plibios,plidio(seri-002[$oa,l57C0])
LINK 1.31

PLILIB RQST PROD_R 0100 /SRCE_D/ 43E5 /DEST_D/ 43E6
/DEBUG_/ 43E7 /SEC_PE/ 43E8 /COPY_I/ 43EA /SERI_I/ 43EB
/ORG_NU/ 43EC /SER_NU/ 43EE /PRODUC/ 43F0 /SECTOR/ 4417
CURDSK 15FF RESET 15A8 SELECT 15AD DBUFF 1529
SELDSK 1440 SECTRN 146C GETDPB 162C ALLVEC 160C
ALLWDS 16E2 SETTRK 144A BSTDMA 147E SETSEC 1455
RDSEC 1460 WRSEC 1466 BFLUSH 1489 MAXWDS 1698
MEMPTR 1504 MEMSIZ 1508 MEMWDS 1516 DFCB0 1521
DFCB1 1525 REBOOT 152D RDCON 1530 WRCON 1535
RDRDR 153A WRPUN 1545 WRLST 154A CONINP 1552
CONOUT 1564 RDSTAT 1570 GETIO 157C SETIO 1581
WRSTR 1589 RDBUF 1591 BREAK 1599 VERS 15A3
OPEN 15B5 CLOSE 15BD SEAR 15C5 SEARN 15CD
DELETE 15D2 RDSEQ 15DA WRSEQ 15E2 MAKE 15EA
RENAME 15F2 LOGVEC 15FA SETDMA 1604 WPDISK 1611
ROVEC 1619 FILATT 1621 GETUSR 1634 SETUSR 163E
RDRAN 1649 WRRAN 1654 FILSIZ 165F SETREC 166A
RESDRV 1675 WRRANZ 1680 SGSCB 168B TOTWDS 1693
STKSIZ 16EE /SYSIN/ 4486 /SYSPRI/ 44AB

UNDEFINED SYMBOLS:

DUMMY

ABSOLUTE 0000
CODE SIZE 42D6 (0100-43D5)
DATA SIZE 0ACA (44F9-4FC2)
COMMON SIZE 0123 (43D6-44F8)
USE FACTOR 46

LINKING SERI-002.OVL
COMMON ERROR

You're help is appreciated - Larry

retrogear

unread,
Sep 22, 2013, 11:39:53 PM9/22/13
to
Ok - I moved the source into Peter Schorn's simh CP/M emulation and got the ser30gen.sub to compile. It still gives DUMMY as an UNDEFINED SYMBOL but the resulting ser30.com seems to be functioning. I get the following:

DIGITAL RESEARCH PRODUCTION SERIALIZER
******* ******** ********** **********

Debugging Diagnostic On (Y or N) n

PRODUCT LIST
******* ****
2: CP/M-3.0 Version 3.0

Product Number ?

<< end of display >>

What was this for again? Is there documentation on this?

I think now I can compile the entire source in one shot inside of cp/m. This was the spot where I got stuck years ago and left it.

Larry

Mr. Emmanuel Roche, France

unread,
Oct 12, 2013, 3:12:18 AM10/12/13
to
Hello, Jeffrey!

"You have mail".

(I am still waiting for an answer to the message that I sent to
your private e-mail address...)

Jon Saxton

unread,
Feb 6, 2014, 3:30:10 PM2/6/14
to
Note that the 6-digit number after the copyright notice is almost
certainly a date ... 15/12/82 in this case. It is interesting that the
format is always the one commonly used throughout the world rather than
the one exclusive to the USA. That is unusual for an American company.

--
Former sysop of Tesseract RCPM+ which operated
in the 1980s from Dural, NSW, Australia.
http://triton.vg/TesseractRCPM+Catalog.html
0 new messages