Post by Marty Stanquist
For option 2, you would develop and
debug the application on zArch hardware
We're not likely to get access to real
z/Arch hardware for development. We will
need to do everything under Hercules.
Post by Marty Stanquist
And yes, we would need to output different object and
possibly assembler formats that work with the target system. Would you be
able to provide a brief overview of the changes made
on the S/380 and S/390?
I'm not familiar with these. Thanks.
True S/370 only provides 24-bit addressing,
meaning if an application needs more than
16 MiB of memory, it is technically
impossible to run.
There are two different paths that overcame
the 24-bit addressing limit, and increased
it to 31-bit. One is real hardware from IBM.
That's the S/390 route. If you wrote your
S/370 code "properly", all you need to do is
mark your load module "AM31/RMANY" and
suddenly your S/370 application has access
to 2 GiB of memory (31-bit addressing). As
well as doing that, IBM added more
The second path is a modification to the
Hercules emulation software, called S/380.
In its simplest form, it simply adds the
same BSM instruction found in S/390. Also
the MVCLE and CLCLE instructions from S/390
are added so that if you are moving or
comparing a block of memory that is equal
to or greater than 16 MiB in length, you
can do so.
The compiler doesn't need to know about
BSM. So long as you generate S/370 instructions,
if a BSM is used, it goes into the
assembler portion of the C runtime library
for MVS. Ideally you would also emit
MVCLE/CLCLE, but only if you detect a length
greater than or equal to 16 MiB.
In practice, S/380 has been expanded to
include most instructions from S/390, so
if you aren't willing to stick with the
S/370 instruction set, well, even hobbyists
can access the required hardware. But
to do so they will need to run Hercules/380
instead of standard Hercules. Sort of.
I can explain in more detail if required.
In addition there is a beta Hercules/380
that includes most z/Arch instructions,
to produce a z/380, so even 64-bit
programming is available to hobbyists.
But from a code-generation point of view,
your major choices are last S/370, last
S/390 (all 32-bit only), first z/Arch
(my suggestion as lowest common
denominator), or most recent z/Arch.
If you want to know all the great
instructions they added in S/390 you
need to look at the ESA/390 Principles
of Operation instead of the S/370 one
which I already pointed you to. Let me
know if you'd like a pointer to that.
If you choose to use S/390 features
like long displacement, the old
assembler that hobbyists have access
to is not able to assemble that. So
I really do encourage you to do what
GCC on MVS does, which is generate
pure S/370 code.
Also note that I have batch run
facilities for MVS/380 under Hercules/380
such that you don't need to know
anything about MVS, you just stick with
your Windows editor, execute a Windows
batch file and wait half a minute for a
result in an output text file. I can get
you set up with that if you're interested
in doing MVS first.
I'd like to continue the discussion in the assembler newsgroup
(openwatcom.users.assembler). See you there.