• Please review our updated Terms and Rules here

CP/M for the 6502

CP/M was an important step in the development of micro computers since it allowed businesses to buy off the shelf software and create a working business system without needing to buy software designed for one brand of hardware. Mostly text based and temrinal input/output devices were all that was necessary. It was not graphics based, for the most part, it therefore wasn't the greatest of all time for gaming. Entering a cave and saying a magical chant didn't survive very long after Apple II and C-64 (and others) graphics made home gaming a big business. Perhaps if CP/M-86 was more of an all GUI update from the beginning we'd be still using CP/M 86 ver 10 today.
 
Digital Research did offer GSX for graphics support on CP/M in both 80 and 86 versions. This was inspired by GKS so there should have been a large amount of software ready to port. GSX seems to have been much more popular in Europe than the US which was helped by Amstrad providing it and drivers with some members of the CPC line. GSX also underpins the later design for GEM.

CP/M-86 had the problem of DRI setting the original price at $240. It did include an assembler but few wanted to pay that much for an OS. CP/M-86's limited support for applications using more than 128K and a file system that was showing its limits didn't help to boost sales. And then came Lotus which effectively ended the market for any OS for the IBM PC not PC-DOS compatible.
 
The problem with this is mostly vision and attitude. First of all, in the 1970s, graphical games weren't a big thing, mostly confined to arcade and set-top boxes (I recall buying a National Semiconductor game box for my brother and his kids back then, along with a watch for myself). Business was about numbers and letters; you didn't draw a picture and show it to the IRS auditor. Further, the graphics, when they did appear, were pretty crude. True, there was the Xerox PARC project with a GUI interface, but it was far too expensive to implement on systems that were catering to people who were just coming off typewriters.
We still haven't shaken that one off, by the way. Why do computers have keyboards today? Even your cellphones and tablets have touch-screens that can do the work of a keyboard. After all, when the person behind the counter asks you to spell your name, you don't ask for a keyboard to do it.
In 20 years, I predict that people will be doing their work by talking with their AI equipment. Keyboards will seem like an artifact akin to a turkey quill pen.
 
you can call it what you will, but it doesn't correspond to a product that DRI produced.
If that's your only criteria, that DRI produced it, then there can be no other CP/Ms.

So, then, is the only thing that make CP/M-68K and CP/M-80 "CP/Ms" the fact that DRI made them? Is there no other commonality shared between them that makes them characteristic of A "CP/M"?
 
I think that's an accurate assessment. Should any other outfit than DRI started selling something called "CP/M" back in the day, they would have been sued into bankruptcy. Make a work-alike, sure, but don't call it "CP/M".

I can't even begin to tell you what unique characteristics of DRI "CP/M" made it a generalized form. There were plenty of other operating systems.

To put it another way, if Mac OS were re-imagined by someone other than Apple on, say, an Intel i860, could it be called "Mac OS"?
 
To put it another way, if Mac OS were re-imagined by someone other than Apple on, say, an Intel i860, could it be called "Mac OS"?

What's you opinion of the BSD's? They aren't all made by Berkeley Software Development anymore.

Is DR-DOS not a DOS?
 
For that matter DOS/360 is a DOS. That's not the point. CP/M is/was a DRI trademark (I don't know who owns it now, but someone did). Do you brew and label your own concoctions "Coca Cola"? Why not?

Screenshot_2022-10-11_12-42-09.png
 
For that matter DOS/360 is a DOS.

If I came off sarcastic, I didn't mean to, and I apologize. I was asking if you felt that DR-DOS was not "legitimately" what PC users think of as DOS because it didn't have "PC-" or "MS-" in front of it. I'm thinking now that you don't think it is "legit" and therefore neither would FreeDOS be. You're talking trademark, not functionality.
 
Call it whatever you want. "DOS" is a very old and somewhat generic term, so it's not a trademark. MS-DOS, however is. Before the PC, in the days of the mainframe, "DOS" generally implied an IBM product. Similarly, there was "TOS" for tape-based systems. And then there was "OS".

My point again, that something transported to a different platform doesn't qualify to have the trademarked "CP/M" attached to it, anymore than any old can of ersatz caramel and flavoring can be called "Coca-Cola". For that matter, I don't think you can modify MS-DOS without the permission of Microsoft and re-sell it as "MS-DOS™". That's what OEM licensing is for--and it's not cheap.

DR-DOS and FreeDOS are both legit (see my note about the generic "DOS" above), so I don't know how you came to your conclusion. But neither has the ability to call themselves PC-DOS or MS-DOS--those names are taken and trademarked.

Call this thing 65-DOS or FloobyDOS, just not CP/M. You can, however, say "Compare to CP/M™".

I don't think you'd get away with doing a 'port of Windows 2.0 to 6502 and calling it "Windows".
 
Last edited:
They aren't all made by Berkeley Software Development anymore.

But they were all originally based on the same (or almost the same, anyway) wad of BSD code, and you could make a cogent argument that including "BSD" in the name of your derivative at least in part helps you live up to the terms of the original license agreement.

And yep, "DOS" has been a generic term for positively forever. "MS-DOS" and "PC-DOS" were trademarkable names for the product that's the functional equivalent of DR-DOS/FreeDos/OpenDOS/whatever, but let us bow our heads and remember...

TRSDOS (Which had its own slew of compatible alternatives: NEWDOS, LDOS, VTDOS, DOS PLUS, MULTIDOS...)
DOS-11
Apple DOS
PRODOS
MSX-DOS
Atari DOS
RT-DOS
AmigaDOS
GEMDOS
PTDOS
(etc, etc...)

So I guess when one says "DOS" around places like this it might pay to qualify your use of the term. ;)
 
CP/M has been open sourced so anyone can use its code. The trademarks have all expired according to the USPTO website. The trademark on plain CP/M ended in 1990 while the trademark on CP/M-86 ended in 1996.
 
But they were all originally based on the same (or almost the same, anyway) wad of BSD code, and you could make a cogent argument that including "BSD" in the name of your derivative at least in part helps you live up to the terms of the original license agreement.

And yep, "DOS" has been a generic term for positively forever. "MS-DOS" and "PC-DOS" were trademarkable names for the product that's the functional equivalent of DR-DOS/FreeDos/OpenDOS/whatever, but let us bow our heads and remember...

TRSDOS (Which had its own slew of compatible alternatives: NEWDOS, LDOS, VTDOS, DOS PLUS, MULTIDOS...)
DOS-11
Apple DOS
PRODOS
MSX-DOS
Atari DOS
RT-DOS
AmigaDOS
GEMDOS
PTDOS
(etc, etc...)

So I guess when one says "DOS" around places like this it might pay to qualify your use of the term. ;)
I was rather partial to HDOS.
 
So CP/M is meaningless. Okay, I concede the point.

I understand the need to have said "CP/M like" instead of "CP/M" back when DRI was protecting its IP and had a trademark (i. e. "a DRI product and therefore what they intended"), and I do see the validity of Chuck(G)'s original opinion that trademark is what makes a brand a brand.

But, in this post-trademark time, I still think there is a difference between the true OS and an OS that functions the same, e. g. CP/M and CP/M-like or Unix and Unix-like. (More on that later.)

However, in regards to a brand being defined by trademark, I just want to point out that after a trademark has lapsed for a long enough time, another company can start using it again no matter what the OS is like. Imagine a few years down the road we see "CP/M(R): The world's greatest VMS compatible OS for ARM processors! (Concurrent Processing/Mobile)"

DR-DOS and FreeDOS are both legit (see my note about the generic "DOS" above), so I don't know how you came to your conclusion. But neither has the ability to call themselves PC-DOS or MS-DOS--those names are taken and trademarked.


And yep, "DOS" has been a generic term for positively forever. "MS-DOS" and "PC-DOS" were trademarkable names for the product that's the functional equivalent of DR-DOS/FreeDos/OpenDOS/whatever, but let us bow our heads and remember...

So I guess when one says "DOS" around places like this it might pay to qualify your use of the term. ;)

Okay, this point really got misunderstood due to the poor naming of IBM's/Microsoft's first OS for the IBM PC. While "DOS" is a generic term (which I never thought otherwise), when speaking in IBM PC compatible circles everyone uses "DOS" as a specific term to mean [PC- or MS-]DOS. So when I said Chuck(G) didn't think that DR-DOS or FreeDOS were not legit, I meant that he didn't consider them to be part of the "DOS brand". So, that indicated that he was thinking of the brand being determined by copyright.
 
In fact, "BSD" is really "BSD UNIX", being a licensed derivative of the original AT&T product.
bsd-unix.jpg


In fact, the "BSD Demon" is copyrighted, not trademarked, so still in force. However, McKusick will permissively license the demon for BSD purposes, providing copyright notice and attribution is provided.

So here we have the interesting case of a symbol for an operating system outlasting the OS itself (the last official Berkeley UNIX was 4.4liteR2 in 1995.)
 
Last edited:
In fact, "BSD" is really "BSD UNIX", being a licensed derivative of the original AT&T product

So far as I know all the open source BSDs call themselves "UNIX-like" because nobody wants to pony up to the Open Group to get "certified" to wear the UNIX Trademark. Apple briefly paid for certification for OS X in the mid-aughts when they went through that brief flirtation with trying to sell themselves as a server solution, and I think BSDi (defunct circa 2002 or so?) also was "officially" a UNIX, but I don't know that any BSD derived OS is currently certified.

... Actually, huh, I guess Apple's registration is still paid up.
 
MSDOS (in whatever incarnation it currently uses) still honors doing a CALL 5 (in the PSP) to make system requests. What's odd is that CP/M-86 didn't.

Well there's also the tiny little problem that the 6502 stack can only exist at 0100-01FF, which on an x80 or x86 is the standard location for the start of a loaded .COM file. It was significant enough that MSDOS did that too. And it's why I never had delusions of running CP/M on my TRS-80 Model I, because even with a compatible CPU, there's no point when everything would have to be re-assembled to 0x4100 or so. At that point you might as well just patch all the OS calls in Wordstar to work with TRSDOS.

I'm still confused by this point. Maybe I don't know enough about these products to be comparing things right, but CPM-86 and CPM-68K are both considered to be "a CP/M" and yet there certainly needs to be reassembling done to make, for example, Wordstar run on those versions, especially for CP/M-68K. Wouldn't the lack of a CALL 5 have been considered a significant obstacle in "porting" many CP/M-80 programs to CP/M-86?

What makes CP/M important isn't just that it let you manage some files on a disk. The large amount of programs written for it and its API are at least as important. There is very little point in running it on an alien architecture with no existing software for it.

Respectfully, are you suggesting that CPM-68K wasn't important/was a failure because it was running on alien architecture with no existing software for it?

The problem is most CP/M programs were written in assembly language. C really wants to be a 16-bit language. Using C on an x80 is a bit tight, but on the register-poor, stack-poor 6502, it's not a very good fit at all. UCSD Pascal was somewhat successful on the Apple II because it paved over the limitations of the 6502 with P-code.

While it's true that "most CP/M programs were written in assembly", I would think that only corresponds to "most MS-DOS programs were written to be run on IBM PCs." It seems to me a cross-assembler and the right library or set of macros should be able to help the problem of porting software. After all, Unix on a x86 or a x286 was a poor fit, but there were ports made nonetheless.

Also, since CP/M itself was originally written on a mainframe in PL/M and cross compiled for 8080 micros, I don't see why C programs would have to be compiled on the 6502 itself.

I think the real questions we have to answer here are:
1. What makes CPM-xxx a CP/M? The (open) source code, or functionality?
2. What makes porting an OS to another computer/CPU doable?
3. Where do we separate the OS from the hardware it runs on?
4. What purpose would a port of CP/M to 6502 have?

I think the answer to the first question would be the source code and anything derived from it. (Just like with BSD.) This makes me ask: was this 6502 "port" derived from the available CP/M-80 sources or was this a "from scratch" duplication of CP/M functionality as the sources on the OP's github suggest by not including any © Digital Research, and only stating "Copyright © 2022 David Given". Usually, functional equivalence alone is called a clone or in this case a "CP/M-like" OS.

And, technically speaking, I wouldn't agree to functional equivalence being what makes a CPM "CP/M" though loosely and for marketing purposes this kind of thing has been the case in the past sometimes.

A lot of the arguments against this port seem to me to boil down to this port can't "work" because CP/M isn't portable like Unix is. I think that CP/M is like Unix WAS around version 3 or 4 (which both came out around 1973), depending on how you think about the PL/M source vs. all the assembly programs written for it.

My opinion on question 4 is that as a starting point this 6502 port would be good for:
- Proof of Concept
- A good learning experience and exercise for CP/M(-like) hobbying
- A point in the direction to head for a useful OS
(requiring a support environment for porting existing CPM-xx programs)
- A new platform for writing 6502 programs with a better(?)/familiar(?) API

If it is/were derived from the original sources, then I'd add:
- A good study of porting OS's to other architectures (a simple OS should be an easier learning example)
- The starting point for a "universal" OS for microcomputers (meaning 8-bit)
- A possible future (fun) project of making a portable CP/M OS
(requiring a merging of implementations from 80, 86, 68K, 6502...)
 
Few PC-DOS programs took advantage of CALL 5 and the method of jumping to the alternate API entry point caused more confusion than it was worth. I doubt having CALL 5 in CP/M-86 would have mattered. CALL 5 was already a problem with MP/M-80 RSXs requiring the value of the jump address to be adjusted so all calls pass through the RSXs before reaching the API.
 
The story of the evolution of CP/M 80 to CP/M 86 is a long story. Suffice it to say that DRI went to great lengths to make it easy to migrate 8080 code to 8086. Instead of using CD 05 00 (CALL 5) to make a system call, one used CD E0 (INT 224)(one byte shorter). The FCBs were still in the same place relative to the first code segment and in the same format. CP/M-86 even places the offset of the end of the code segment in program code segment 6 and 7, for those 8080 programs using the BDOS call address to figure the end of user memory. Using a program interrupt as an API entry is very clean.

The CP/M 80 memory map was already in trouble when the Z80 arrived. The TRAP interrupt is to location 0066h, which happens to be in an FCB.

There are lots of other considerations, too numerous to explain in a short post.

It's funny to me that nobody mentions GEM as used on the Atari ST, as "MSDOS" which, for most intents and purposes was a recasting of the MSDOS API and FAT filesystem to the 68000.
 
I find it interesting that someone took the time to create a 6502 DOS that acts like CP/M-80. My hat is off for all the effort. But even if this 6502 OS mirrors CP/M calls in many ways, what good is it. There never was one common 5.25" CP/M-80 floppy format and therefore what are you going to do with it. There almost was a common one with the 8" IBM format, useful for loading software from commercial developers, but even there not all systems had 8" soft sector drives. So if you can't load data or programs from all the various Osborne, Kaypro, Northstar, and so many other format floppies, then what's the point. No commercial software written in 6502 "CP/M" exist, plus no ability to transfer data back and forth for use with running a common program written for both DOS's. So you've created a DOS that will never be used outside of a few experimenters hacking an ancient OS for the proposes of seeing if it is possible. Very good work, but will anyone make use of it?
 
Back
Top