Octocontrabass wrote:kerravon wrote:I look upon mode-switching as a fundamental failure.
You might be wasting your time with x86.
It's not that simple. I'm interested in what specifically the x86 got wrong, and why, and whether it is possible to recover from that situation, and when. So I need to know a lot of background details.
kerravon wrote:I assumed that a major company like Microsoft combined with a major company like Intel would be able to organize a tiny mode program to run.
They can. The reason they don't is money. Paying engineers to keep ancient software running is more expensive than dropping support and losing you as a customer.
Yeah, and this probably exactly answers the question when people ask me why I wrote PDOS. I don't want to be at the mercy of someone who has very different goals.
kerravon wrote:I consider even considering resorting to emulation to be a fundamental failure too.
Why?
Complexity and overhead that shouldn't be necessary. Or rather - someone can explain to me why it is necessary, without "bigger profits for Intel/Microsoft" as part of the explanation, as that has zero value to me.
Anyway, I have made progress. Which is one of the reasons for the long delay - again.
I have managed to find out some of the internals of AHINCR. It's actually an offset. Addresses get resolved at runtime and this is considered to be the offset portion of a 16:16 address.
With an NE format executable, there is a class of "relocation corrections" that are "offset only", and this is where that is put.
And I have demonstrated (crudely) on PDOS/86 that I can load an NE executable that contains that relocation type.
And I just found out today that MSDOS 4.0 supported loading NE executables too. I think that is RM16 and 640k still.
So. I am thinking of switching to NE executables for PDOS/86 and making it sort of a mini-clone of my understanding of MSDOS 4.0.
There's no particular reason why I need to stick with MZ. Although I can probably make MZ work for my purposes too. I would need to make sure that no segment crossed a 64k boundary (and pad with NULs if necessary), and have the AHINCR offsets all populated suitable for the 8086 (ie 0x1000), and then have an MZ extension to zap all those locations, and AHSHIFT, when the module is loaded on a non-8086 OS (ie PDOS/286 mainly).
That way the MZ executables would still run on standard MSDOS 6.22.
But I don't particularly need that.
And anyway I'm planning on changing the interface away from INT 21H and into the PDOS-generic interface instead (where the app receives the kernel's C library plus additional kernel functions like mkdir()). So I don't really need to maintain compatibility with anything except the hardware.
I don't have a particularly sensible goal anyway. I'm sort of belatedly trying to compete with OS/2 1.0. But keeping the MSDOS API as much as possible. But with a cleaner C interface like OS/2 provides.