Compiling Original CP/M-80 Sources

14 views
Skip to first unread message

William Beech

unread,
Aug 29, 2025, 6:39:59 PMAug 29
to intel-...@googlegroups.com
Mark,

I am trying to use the DOS versions of PLM80, ASM80, LINK80, LOCATE80 to
construct the CPM80 .COM versions of the CUSPs on a windows box.  I can
compile the PLM80 sources to .OBJ just fine.  I have all the ASM80
sources compiled.  I also have compiled the source for PIP and STAT into
.OBJ files.  I have named your LINK to linki30 in my .BIN directory.  My
problem occurs when I attempt to LINK the modules and libraries together
to generate the .LNK file. I get this:

PS D:Development\...\CPM_Source\2.0\cpm20_code> linki30 pip.obj,
system.lib, plm80.lib TO pip.lnk
ISIS-II OBJECT LINKER V3.0
COMMAND TAIL ERROR NEAR #: 'TO' EXPECTED
-LINKI3 PIP.OBJ SYSTEM.LIB#
PS D:\Development\...\CPM_Source\2.0\cpm20_code>

All the files are in the working directory.  If I try to link STAT
forgetting the libraries, I get:

PS D:\Development\...\CPM_Source\2.0\cpm20_code> linki30
ISIS-II OBJECT LINKER V3.0
COMMAND TAIL ERROR NEAR #: INCORRECTLY SPECIFIED FILE
-LINKI3#
PS D:\Development\...\CPM_Source\2.0\cpm20_code> linki30 stat.obj to
stat.com
ISIS-II OBJECT LINKER V3.0

UNRESOLVED EXTERNAL NAMES:
 BOOT - REFERENCED IN :F0:STAT.OBJ(STAT)
 MON1 - REFERENCED IN :F0:STAT.OBJ(STAT)
 MON2 - REFERENCED IN :F0:STAT.OBJ(STAT)
 MON3 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0012 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0014 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0025 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0029 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0030 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0034 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0035 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0069 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0088 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0091 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0094 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0098 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0100 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0101 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0103 - REFERENCED IN :F0:STAT.OBJ(STAT)
 @P0104 - REFERENCED IN :F0:STAT.OBJ(STAT)
PS D:\Development\...\CPM_Source\2.0\cpm20_code>

So I know your DOS tools are working correctly.  These are the EXTERNAL
links in the source.  My command lines for LINK80 are incorrect.  I have
reviewed the "ISIS Users Guide" for the command format but have had no
luck.

Do you know how to properly format the LINK80 and LOCATE80 commands to
build the CPM-80 .COM files?

Thanks for all the work you have done on these tools.  I appreciate the
effort it took to create them!

Bill

mark.p...@btinternet.com

unread,
Aug 29, 2025, 11:11:46 PMAug 29
to intel-...@googlegroups.com
Bill
I suspect the problem is with the file name pip.lnk. Under windows this is a shortcut name. Try renaming to pip.link
Mark

Regards
Mark

From: intel-...@googlegroups.com <intel-...@googlegroups.com> on behalf of William Beech <nj...@nj7p.org>
Sent: Friday, August 29, 2025 11:38:49 PM
To: intel-...@googlegroups.com <intel-...@googlegroups.com>
Subject: intel-devsys Compiling Original CP/M-80 Sources
 
--
You received this message because you are subscribed to the Google Groups "intel-devsys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intel-devsys...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/intel-devsys/722ab9dd-e878-4406-b758-f226839bf594%40nj7p.org.

William Beech

unread,
Aug 29, 2025, 11:50:02 PMAug 29
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

That is true!  But no, the failure is the same.

Bill

mark.p...@btinternet.com

unread,
Aug 30, 2025, 4:54:17 AMAug 30
to intel-...@googlegroups.com
Bill
Which versions of link are you actually using.
The error message suggests you are using a version that is limiting names to ISIS 6.3 format as the error message is occurring after 6 chars of the linki30 name.
My current windows-based version supports longer names
Mark


Sent: 30 August 2025 04:48
To: 'mark.p...@btinternet.com' via intel-devsys <intel-...@googlegroups.com>
Subject: Re: intel-devsys Compiling Original CP/M-80 Sources
 

William Beech

unread,
Aug 30, 2025, 4:52:39 PMAug 30
to intel-...@googlegroups.com
Mark,

I pulled the latest from your GitHub.  The build failed in HEXOBJ because "strncasemp" was undefined.  No problem, we don't use it. 

The link is version 3.0.  Has been all along.  I use the name to "LINK.EXE".  Same error.

link pip.obj, plm80.lib TO pip.mod

ISIS-II OBJECT LINKER V3.0
COMMAND TAIL ERROR NEAR #: 'TO' EXPECTED
-LINKI PIP.OBJ PLM80.LIB#

The error occurs right after the PLM80.LIB file is parsed.  It says it does not find "TO" where the "TO" is!

An earlier version actually worked.

link pip.obj, plm80.lib TO pip.mod
OMF85 OBJECT LINKER V3.0

Unresolved External Names:
 IOBYTE - REFERENCED IN pip.obj(PIPMOD)
 MAXB - REFERENCED IN pip.obj(PIPMOD)
 FCB - REFERENCED IN pip.obj(PIPMOD)
 BUFF - REFERENCED IN pip.obj(PIPMOD)
 MON1 - REFERENCED IN pip.obj(PIPMOD)
 MON2 - REFERENCED IN pip.obj(PIPMOD)
 MON3 - REFERENCED IN pip.obj(PIPMOD)
 BOOT - REFERENCED IN pip.obj(PIPMOD)

I have pulled the executable file from cports-main/install/X64-Release. 

Note the difference in the sign on message between the two examples.  Is the "OMF85..." the correct sign on for your tool? 

Bill

William Beech

unread,
Aug 30, 2025, 5:37:23 PMAug 30
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

When I build the CPorts, do I need to set a flag to get the new stuff?  The version of ASM80 I built has reverted to the 6 character names.  

Bill

mark.p...@btinternet.com

unread,
Aug 30, 2025, 6:03:50 PMAug 30
to intel-...@googlegroups.com
Bill
I changed the sign on to reflect that the code is no longer ISIS II dependent. 
Can you run each of the tools using a single -V option and capture the information shown to help me understand what is going on. 
There should be no need for special flags and hexobj should build if you are using the provided solution file or make for the Linux build. 
If asm80 has reverted to 6 characters you may be picking up the wrong file on your path. The solution file generates the files in a subdirectory of the Install directory, but by supplying an appropriate install.cfg file you can get it to install automatically. 
Note the missing references indicate you need to include the object code from the asm file which defines the entry points. 
Mark

Regards
Mark Ogden

Sent: Saturday, August 30, 2025 10:36:13 PM

William Beech

unread,
Aug 30, 2025, 9:01:35 PMAug 30
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

That is a true statement.  Here are the tool runs with -v option:

asm80 -v
asm80-4.1 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
link -v
link-3.0 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
locate -v
locate-3.0 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
lib -v
lib-2.1 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?

Does this tell you anything?

I am building on Win11 with VS 2022.  No flags, as I expected.  I run the cports.SLN file. 

I used a "d:\bin\link " command to insure that is not the case.  What do I put in the install.cfg file to place the executables into D:\bin\? 

I have not gotten that far, Mark.  Object code from what ASM file for the externals that are unknown?  It always seems to be the same ones, so I assumed I need to create a library to resolve these errors? 

Thanks for your time on this.  I would like to get batch file to build the CPM80 utilities with one command.

Bill



On 8/30/2025 3:03 PM, 'mark.p...@btinternet.com' via intel-devsys wrote:
Bill
I changed the sign on to reflect that the code is no longer ISIS II dependent. 
Can you run each of the tools using a single -V option and capture the information shown to help me understand what is going on. 
There should be no need for special flags and hexobj should build if you are using the provided solution file or make for the Linux build. 
If asm80 has reverted to 6 characters you may be picking up the wrong file on your path. The solution file generates the files in a subdirectory of the Install directory, but by supplying an appropriate install.cfg file you can get it to install automatically. 
Note the missing references indicate you need to include the object code from the asm file which defines the entry points. 
Mark

Regards
Mark Ogden

William Beech

unread,
Aug 30, 2025, 11:14:19 PMAug 30
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

Here is the -V options:

asm80 -V

asm80-4.1 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
asm80-4.1 reverse engineered to modern C
Contributors: Andrey Hlus
64 bit build: Aug 30 2025 14:25:47
+ showVersion 2023.4.23.14 [ab26da9]
Support email: sup...@mark-ogden.uk
link -V

link-3.0 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
link-3.0 reverse engineered to modern C
Contributors: Andrey Hlus
64 bit build: Aug 30 2025 14:25:48
+ showVersion 2023.4.23.14 [ab26da9]
Support email: sup...@mark-ogden.uk
locate -V

locate-3.0 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
locate-3.0 reverse engineered to modern C
Contributors: Andrey Hlus
64 bit build: Aug 30 2025 14:25:46
+ showVersion 2023.4.23.14 [ab26da9]
Support email: sup...@mark-ogden.uk
lib -V

lib-2.1 (C) Intel <port Mark Ogden> xxxx.xx.xx.xx?
lib-2.1 reverse engineered to modern C
64 bit build: Aug 30 2025 14:25:47
+ showVersion 2023.4.23.14 [ab26da9]
Support email: sup...@mark-ogden.uk

Bill

mark.p...@btinternet.com

unread,
Aug 31, 2025, 6:02:10 AMAug 31
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Bill
It would appear that your c-ports directory is inconsistent.  What you have is either using old tools or the _version.h files are missing.

The preferred option is to use git to clone c-ports which will bring in all the required files.
You can then use git pull to get future updates.
This option will also prevent the ? at the end of the version number.

Failing this use the zip file from github and extract to a new c-ports directory. Even with git not installed the code should pick up sensible version numbers suffixed with a ?.
Note, don't pick individual files.

Alternatively, the intel80Tools repository contains prebuilt versions of the build tools which you can use. 
Note again you may need to get the latest versions from GitHub. If you cloned the original repository git pull or GUI equivalent can be used to refresh the files along with any makefile changes

As to missing references, I use a file "cpm.asm" which should be sufficient to add to your builds
Its contents are
      public mon1, mon2, boot
        public mon3, iobyte, fcb
        public buff, maxb
boot  equ   0
mon1 equ   5
mon2 equ   5
mon3 equ   5
iobyte  equ 3
fcb      equ 5ch
buff      equ 80h
maxb   equ 6
      end

To use install.cfg see the documentation on the install tool at the end of doc/versionTools.pdf document. The solution file will use install.cfg if it exists.

Mark


Sent: 31 August 2025 04:13

William Beech

unread,
Aug 31, 2025, 4:34:35 PMAug 31
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

Thanks for being so patient with me.  

I tried to set up GIT to clone your repository.  Got boll-axed up with my KEY for GitHub.  Instead, I deleted the working directory, pulled down a clean zip file, unzipped it, and built the source.  Build was clean.  I modified the properties to build the release for ASM80, LINK, LIB, and LOCATE.  Moved the release executables into my bin file.  I get the OMF sign on from the assembler.  So I believe I have a clean build.

I can compile and link PIP with the same errors for the externals as before.  Now to clear that error.

Bill

William Beech

unread,
Sep 1, 2025, 7:47:41 PMSep 1
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Mark,

I built a simple ASM file to define the unknown addresses.  Got the link to run on STAT.  Here LOCATE seems to complete but is creating a binary for ISIS:

locate stat.lnk to stat.com map
OMF85 OBJECT LOADER V3.0

MEMORY MAP OF MODULE STAT
READ FROM FILE stat.lnk
WRITTEN TO FILE stat.com
MODULE IS NOT A MAIN MODULE

START   STOP LENGTH REL NAME

3680H  4A4DH  13CEH  B  CODE
4A4EH  4A69H    1CH  B  STACK
4A6AH  5F1BH  14B2H  B  DATA
5F1CH  F7FEH  98E3H  B  MEMORY


But the Win11 Power Shell is having a problem passing values in parenthesis:

locate stat.lnk to stat.com map code(0100h)
0100h : The term '0100h' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:38
+ locate stat.lnk to stat.com map code(0100h)
+                                      ~~~~~
    + CategoryInfo          : ObjectNotFound: (0100h:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

So if I replace the 0100H with 256 we get:

locate stat.lnk to stat.com map code(256)
OMF85 OBJECT LOADER V3.0
Command line error near #: left parenthesis expected
D:\bin\locate stat.lnk to stat.com map code#


As you see, the left parenthesis is there.  LOCATE -V yields:

locate-3.0 (C) Intel <port Mark Ogden> 2025.7.25.16
locate-3.0 re-engineered to modern C
Debug 64 bit build: (msvc 19.44.35215) Aug 31 2025 13:21:42
Contributors: Andrey Hlus
Support email: sup...@mark-ogden.uk
 

So I am running the latest version of LOCATE.  What am I doing wrong this time?

Thanks!

Bill

mark.p...@btinternet.com

unread,
Sep 2, 2025, 12:10:01 AMSep 2
to intel-...@googlegroups.com
Bill
Have you tried quoting the parentheses. E.g. “code(100h)”
Mark

Regards
Mark

Sent: Tuesday, September 2, 2025 12:46:30 AM

William Beech

unread,
Sep 2, 2025, 2:30:08 PMSep 2
to 'mark.pm.ogden@btinternet.com' via intel-devsys
Reply all
Reply to author
Forward
0 new messages