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