Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

definitions again (Developers)

posted by kerravon, Ligao, Free World North, 13.04.2024, 08:53

> A lot of projects still require GNU Make (not BSD make, not "POSIX"). Just
> saying, a lot of "portability" is still hampered by the "POSIX shell" (GNU
> AutoTools), which requires fork(), which is cumbersome to work around. A
> lot of that was just to avoid a *nix vendor's broken libc. Heck, POSIX was
> invented to bridge the gap between SYSV and BSD.
>
> It's just a mess. (I should make a different thread about strict
> "portability".)

I totally agree about it being a mess. And that's why
I started with MSDOS and only made improvements to do
with different hardware, not changing the software
fundamentals.

However, that then led me to find that almost everything
I want to do can be done in standard C90, or at most
adding ANSI X3.64 on top. Very little required any
extensions - MSDOS or otherwise.

And once I had established that, plus some recent
information, I was able to have another crack at
Linux, which - as noted, has fork() instead of
spawn() so I didn't want to touch it with a barge pole.

However, I was now in a position to at least have
dummy versions of these functions in PDOS/386, and
I discovered that there is a vfork, or:

CLONE_VFORK 0x4000

Where you basically aren't allowed to do anything
other than execute exec().

Which meant that in PDOS/386 I was able to have a
dummy fork/clone.

And basically bring the Linux apps I am interested
in (ie the ones I build myself), back to what I
expect from MSDOS.

Basically I have turned Linux into MSDOS to my
satisfaction.

The other thing that took about 2 decades to resolve
was malloc(). I didn't want to get involved in
brk/sbrk.

However, it turned out there was another way of
allocation memory - ask for a complicated memory
map but then add a "just kidding" parameter to it.

So the Unix/Linux/POSIX joke has been brought to
MSDOS levels of sensibility once you know how to
do it.

Oh yeah - and the mangled stack could be worked
around too. You can ignore it and go to /proc/<pid>/cmdline
instead.

All 3 of those things had been outstanding in PDPCLIB
for 2 decades and then suddenly got resolved a couple
of months ago such that Linux is (or rather - can be)
as simple as MSDOS.

You can use a relatively simple C library (PDPCLIB) to
hide that ugliness too.

So if you want a 64-bit version of MSDOS on any
platform - just use Linux. And follow the C90
standard in the first place.

I haven't yet resolved what to do about those
situations where you want more than C90, ie
directory scanning. MSDOS gets a DTA and then
you use findfirst and findnext INT 21H calls
(4E and 4F). Win32 doesn't use a DTA. POSIX
has another way (opendir). Linux has another
way (getdents). I'm interested in FAT, not
Linux filesystems, so I'm not sure which to
go with (possibly none of them). OS/2 is another
one that could provide inspiration. UEFI too.

All my 8086 apps will be recompiled as NE executables
and work in both PM16 and RM16 (without separate
codepaths), so since I'm recompiling anyway, I can
have a different API. But that doesn't mean I want
a different API. MSDOS functionality would be the
main driver. But not the sole option for API.

Any suggestions?

BFN. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 153 users online (0 registered, 153 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum