390 file format

14 views
Skip to first unread message

Paul Edwards

unread,
Aug 16, 2025, 9:56:21 AMAug 16
to z390
Is the 390 file format documented anywhere?

I'm especially interested in the first 32 bytes.

In addition, is a tool provided to convert this file format into
something that z/OS can handle?

Thanks. Paul.


C:\z390_1.8.3\demo>hexdump hello.390
000000  31303032 54463F3F 000000A0 00000000  1002TF??........
000010  00000000 90ECD00C 45FF0068 00000000  ........E..h....
000020  00000000 00000000 00000000 00000000  ................
000030  00000000 00000000 00000000 00000000  ................
000040  00000000 00000000 00000000 00000000  ................
000050  00000000 00000000 00000000 00000000  ................
000060  00000000 C4C5D4D6 40404040 F0F861F1  ........@@@@..a.
000070  F661F2F5 F1F74BF5 F1404040 50FD0008  .a....K..@@@P...
000080  50DF0004 18DFA715 000A000F 0000C8C5  P...............
000090  D3D3D640 E6D6D9D3 C4F60A23 41F00000  ...@.......#A...
0000A0  58D0D004 58E0D00C 982CD01C 07FEF6F6  X...X....,......
0000B0  F6F6F6F6                             ....

C:\z390_1.8.3\demo>

Abe Kornelis

unread,
Aug 16, 2025, 10:49:13 AMAug 16
to Paul Edwards, z390
Paul, 
I doubt it is documented. object files should be transferable, though. but to run a z390 assembled program on z/xx requires you to assemble with the correct version of the target OS standard maclibs. the z390 supplied maclibs generate code that is incompatible.

--
You received this message because you are subscribed to the Google Groups "z390" group.
To unsubscribe from this group and stop receiving emails from it, send an email to z390+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/z390/ba78845a-ba60-4886-981a-c8efb92315d6n%40googlegroups.com.

Paul Edwards

unread,
Aug 16, 2025, 11:46:25 AMAug 16
to z390
Ok, thanks.

It is now just the first 8 bytes that we are interested in,
but it's not very important, as pdld is already working,
and able to generate the 390 file itself, which can then
be executed by bat\exec.

And we now know what that TF is - the amode and
rmode, which pdld can set.


C:\z390_1.8.3\demo>hexdump hello.390
000000  31303032 54463F3F 000000A0 00000000  1002TF??........


BFN. Paul.

Joe Monk

unread,
Aug 16, 2025, 6:24:14 PMAug 16
to Paul Edwards, z390
The load module format is:

/*
   * load module header, code, and rld variables
   */  
   /*
    * 20 byte header with 5 fields as follows
    * offset  0 - 4 character format version
    * offset  4 - 4 character options as follows:
    *   1 - AMODE31 T/F - default T
    *   2 - RMODE31 T/F - default F
    *   3 - RESERVED
    *   4 - RESERVED
    * offset  8 - full word length of code
    * offset 12 - full word entry offset
    * offset 16 - full word count of rlds

Joe

Paul Edwards

unread,
Aug 16, 2025, 6:24:14 PMAug 16
to z390
On Saturday, August 16, 2025 at 10:49:13 PM UTC+8 abeko...@gmail.com wrote:

> I doubt it is documented. object files should be transferable,
> though. but to run a z390 assembled program on z/xx
> requires you to assemble with the correct version of the
> target OS standard maclibs. the z390 supplied maclibs
> generate code that is incompatible.

Which bit is incompatible? The WTO example that I
assembled worked fine on MVS 3.8J under Hercules.

And thanks to upward compatibility, it should work on
the latest z/OS too.

BFN. Paul.

Reply all
Reply to author
Forward
0 new messages