Given that he was clearly designing CP/M from the start to be portable to other machines, I do think that the objective was to "enfranchise future machines."
Future CP/M architecture systems, sure, but not ROM booting systems that keep the ROM in the lower memory. I mean, I like the idea you presented - but if that was his objective, wouldn't saving everything as a kind of OBJ file make more sense, and having the CCP/BDOS restructure all the jumps with portable code?
And how much would my proposal really limit what CP/M could do? It does provide (albeit in a slightly more awkward way) the ability to use a full 56K of RAM, and even a standard overlay system that, if anything, makes it easier to run programs that need more code and static data on machines without enough main memory for all of it (via a more or less standardised, if limited, overlay system).
I think as long as the system
a) Ran on 8080 machines.
b) Was inexpensive to make the machines.
c) Removed the requirements to write your own system
then it would be a success no matter what it looked like.
Right: but remember what a "cold boot" is: it's initialisation
after the CCP, BDOS and BIOS have been loaded by the
boot sector.. So no, that will not restore a BDOS (or BIOS) that's been stomped on; your only option is to reboot the whole machine, which CP/M did not provide an API for. (But I guess the user can always just hit the reset button.)
My BIOS does, but I imagine you're right that some BIOS ( Maybe all other BIOS ) don't reload the entire boot process from the boot sector upwards.. I've never really taken the time to check all BIOS I encountered. I might be the only one that does it that way.
That's quite an interesting thought. It's a lot easier to do it through the BIOS - But you could have the bootstrap ROM do it and load the BIOS from disk also, or even relocate the BIOS from ROM.
@durgadas311 or
@JohnElliott would probably know how different BIOS approach the cold boot.
And I'm just not really getting the point: the whole idea you're looking for, "get rid of the OS and do a cold boot after to bring it back" just seems so much more easily (and, often, cheaply!) solved by not bothering with CP/M at all and simply doing self-booting games, which you could fairly easily "install" by having the user create a bootable CP/M disk for his system and then sticking your own code in the BDOS and CCP (and BIOS, if you like) sectors of it, though you still do have to deal with the relocation.
It's just how I wrote my BIOS. It's not that complex. But as noted, I might be the only one who views it that way?
Not at program exit, but I don't see much point to keeping the BDOS until program exit and then trashing it just before you reboot. And you can't trash the BDOS earlier than that, because you lose your OS. If you don't need the OS while you're running (say for a game that doesn't need to load anything after its initial load, and provides its own console I/O routines, why bother with CP/M at all? Just do a self-loader and skip CP/M entirely. (As you point out in later comments.)
Trashing the BDOS and even the BIOS may not be ideal or even a good idea under CP/M, but you *can* do it. If it was all in ROM, then there's no need to worry about trashing it in the first place.
This is interesting, but I'm not convinced that there's that much to cut down. I don't know what "buffers" you're talking about for the drives; there is a single 128-byte
DIRBUF, but that's shared amongst all drives, and sector I/O is done from/to the DMA area in user memory. There is a per-drive disk parameter block, which is 16 bytes, but I'd imagine that most smaller systems would support just four of those, which is 64 bytes of ROM or RAM.
I guess I am reflecting on what I had to code here - There are all kinds of tables - Vectors, Headers, multiple load buffers, stack etc. So much ! and then you get all the maths for things... Parsers, Syntax checkers, etc. And on top of that you end up with a fairly complex OS - If that complexity goes, so does most of the code. 2K is plenty of space to deal with the rest, and you could end up with rom slots for each additional piece of hardware that needs it's own code, in a parallel space alongside the OS but not in user memory. It's not paging, per-se, but it would work the same.
I'd probably drop save... I never really liked it. it always feels like a kludge to me, and while you need it in CP/M, that's because it's there and people use it. No commands means no matching logic, and minimal buffers. If you want a greater OS shell, load one that does more of what the CCP does. Sure, you'd get some curious issues such as not having commands you need at times, because disk space was used for something else - if I need a way to do stuff like that, I'd probably create something like function keys, that execute code when pressed. Save desired? Load and assign the save function key - or maybe make it an entire debugger somewhere in memory. Maybe set these up to run under interrupt even?
I think I'm just confused by this. Are you saying that here are no changes at all that could be made in 1974 that would make any difference to the changes you'd want in 1978; it would be just as hard and have just as many incompatibilities regardless of what the 1974 version looks like? That sounds...unlikely to me. But if so, I guess this topic has no relation to anything you'd do in 1978, and you just have to treat it as stand-alone.
I proposed a LOT of things I'd do differently with the 1974 approach. It wouldn't be CP/M anymore, but it would be OK. And I'm just brainstorming for ideas on how I'd approach it... I'd probably write up a list and rewrite it several times as I progressed, so anything I say I might change - but things like logical addressing? I'd probably keep that - and I'd probably keep simplifying it to a minimum - but I might go with a more CP/M-like disk structure since it simplifies loading -
Knowing a lot about the future, I'd probably spend some time planning to take advantage of things early... Hot Tub Time Machine style. Even that's not a guarantee of success. But if I could demonstrate an ability to generally predict future changes, I could probably gain enough of a financial following to get lucky.
But there are lots of questions -eg, How old am I? I was 5 in 1974. Am I still 5? Or should I be 15? 30? Do I already have a computing degree? Am I Gary Kildall?
So I'm just thinking about how I'd approach the problem rather than how I'd have changed the first CP/M.
Having written a CP/M compatible OS, I learned a huge amount about what he may have been thinking at the time, and of course, I made a lot of assumptions - such as Cold boot reloads the BDOS/CCP
But I remember hating the 7 bit limitations. And I even almost rewrote my OS with 256 byte file buffers...