On Sunday, March 14, 2021 at 3:03:30 PM UTC+11, Rod Pemberton wrote:
> I seem to recall that he's been executing
> his x86 code on an emulator for an
> IBM mainframe. If so, he probably wants
> a software solution instead of hardware,
> but he'll have to state his desires here.
Actually I didn't know *why* I wanted to do that,
I just thought it would be an interesting thing
But you are totally correct. If Hercules/380 has
been built as x64 so that it can present an entire
4 GiB to the S/380 box, so that I can then run
PDOS/3X0, and it also gets the entire 4 GiB, I
then want to be be able to load 32-bit x64
executables into the address space managed
by PDOS/3X0 and then switch to an 80386+
coprocessor and execute that executable and
have it run at native speed, with full EBCDIC
data, and then return to PDOS/3X0 without
anyone at all knowing or caring or complaining.
So again - what 32-bit instructions can I actually
execute while in x64 mode? Enough to do a
GCC compile? GCC must not access memory
beyond its allocated region.
Note that when I say "switch coprocessor", I
mean that Hercules/380, while running x64
instructions with 64-bit pointers, will do this:
static int (*genstart)(void (*cbfunc)(void *cbdata, int funccode, void *retptr, char *str), void *cbdata);
rc = genstart(cbfunc, NULL);
ie a bog standard function call, which the OS has
no knowledge of.
Hercules/380 itself will also have no knowledge of
what it is doing. Only PDOS/3X0 knows what it is
doing, as it has executed 32-bit S/380 instructions
to set up an environment ready for the above
function call, and just said to Hercules "everything
is set to go, just call the function at this address
Thankyou for teasing out what was actually possible
if you bypass the hardware.