On 22/12/23 19:57, Paul Edwards wrote:
> It's one of these "forest for the trees" things.
Actually, I don't think it is a case of this at all.
> There is not a lot of code involved to "glue"
> a (limited target) Win32 executable so that it
> can run on OS/2, which is still commercially
> supported in the form of ArcaOS.
Actually, I believe it is working (e.g. on Linux
as the latest target) because I have managed to
combine two C libraries into one.
It is not obvious that it is possible to do that.
In addition, with msvcrt.dll in particular, for
fprintf(stdout ...) to work, it required mapping
of some standard names.
This was done by Alica years ago for producing our
equivalent DLL, and this code needed to be activated
in the Linux etc environment.
So yeah - it's a limited amount of code, but anyone
would be forgiven for thinking it was nominally
impossible to combine two different C libraries
into a single executable. I have a "runnum" variable
that knows it needs to switch parameter format for
numbers above 1 too.
So yeah - the incremental approach to getting this
working (including going via 16-bit systems, and
trying to get the abstraction right) - was part of
the process, not unnecessarily convoluted.
In hindsight there isn't a lot of code involved
and it's seemingly obvious.
But quite frankly, as per this correction - I'm only
vaguely aware of how it works at all. And at no point
during the construction was I 100% sure the various
steps would work. I had no idea whether there was
a show-stopper I hadn't thought of.
With the 16-bit in the path, one of the potential
show-stoppers was the ds pointing to the DGROUP,
but lo and behold, Microsoft C 6.0 and Watcom
both had an option for ds to not be assumed to
be pointing to DGROUP, requiring the ds to be
reloaded.
Someone once told me (I don't know if it is true),
that something like pennicilin was actually invented
in Africa. They had stumbled across a sequence of
steps - some of them unnecessary - to produce the
required antidote (by luck). So it's probably
something closer to that. There were a huge number
of "I wonder if this works?" along the way. Maybe
a lot of those questions had answers already known
to others, but the only answers I ever got from
others around at the time were "no, the format is
incompatible so it won't work" or something along
those lines. Never once did someone say "of course
it will work - how the hell do you think xyz works?".
So I never had any confidence that any of the
numerous steps would work.
Thus I don't think it is fair to say that I
couldn't see the forest for the trees. It's more
that I managed to grow one tree on top of another
tree and the entire forest didn't collapse as it
was always in danger of doing.
A bit like S/380. It's nominally impossible to
run a 31-bit program on a 24-bit OS. You could
say "oh - dos extenders do that", but it's not
the same, and before it was proven to work, there
wasn't one person saying "of course it will work -
it's just a simple dos extender", but there was
a gaggle of people saying it wasn't possible.
Basically it is nominally impossible to put 31
liters of water into a 24 liter container. But
is it? If the rules used the chemical equation
H2O, so that freezing wasn't prohibited, you
can indeed delicately balance 31 liters of ice
in a 24 liter container.
Or in my case - 2**31 liters in 2**24 liters -
much more useful.
BFN. Paul.