kerravon86
Joined 3 years ago
Joined 3 years ago
In both cases - it depends.
PDOS/86 will certainly run some binaries. But if you say "what about xyz" the answer is likely "probably not".
I don't have a lot of interest in 16-bit, so it's there for demonstration purposes mainly.
My interest is 32-bit.
The biggest genuine task I do is getting GCC to compile itself with full optimization, which requires something like 23 MB of memory on the mainframe and something like 37 MB on a PC.
Far far below the 4 GiB barrier (or even 2 GiB barrier), but above even 16 MiB, nevermind 640k.
If it is source code you have, then it will require recompilation at a minimum. I made use of that fact to provide a C-defined API to wrap the INT calls, so at least nominally you need to use those C functions. But you may be able to get away with an existing int86x call (or even assembler instruction), as the interrupts do exist (ie even in 32-bit). If your MSDOS program is C90-compliant then that should work unchanged - but that is the case for any environment, not just MSDOS or PDOS/386.
I am not aware that I have any obsession with Unix. For PDOS/386, PDOS/86 and PDOS-generic I use an API inspired by MSDOS. For z/PDOS I use the MVS API. I specifically don't want anything to do with Posix which mandated fork() but didn't provide for simple memory allocation.
But in hindsight, a "properly-written" program from the 1970s would have been restricted to 16 MiB at that time, but magically turned into 2 GiB in the 1980s, and then magically turned into 4 GiB in I think the 2010s (but this is murkier about when you want to start counting - real hardware was only demonstrated in 2022 or 2023 - can't remember).
"long long" itself is a fundamental violation of the original language too. If you want some large value - 512 bits, 1024 bits, 1113 bits, whatever - that's what "long" is for.
I am writing in C, not Turtle Graphics. I'm happy for the entire PDOS suite to be rewritten in Pascal or any other language. But first I haven't even completed C90. And it is extremely difficult trying to get a C90-compliant compiler too. I still haven't determined whether I need to dumb down PDOS to the C90 subset that SubC provides.
There are now makefiles for the 2 executables that I previously only provided bat files for. The bat files themselves were trivial anyway and I would have converted them to shell script for you had you asked. In actual fact, those .bat files are already shell scripts as far as I know. You can rename .bat to .sh if you want.
And you don't need to use Windows/Linux anymore, PDOS is self-hosting, including the building of the tools.
That's the concept, regardless of whether they (we) chose to name it differently.