Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > openwatcom.users.assembler > #16

Re: S/370 Assembler, Disassembler

From Paul Edwards <mutazilah@gmail.com>
Newsgroups openwatcom.users.assembler
Subject Re: S/370 Assembler, Disassembler
Date 2018-04-07 08:38 +1000
Organization Private, Sydney, Australia
Message-ID <6.mutazilah@gmail.com> (permalink)

Show all headers | View raw


> Please discuss assembler and disassembler
> issues for the S/370 target in this thread.

Hi Marty. Thanks for your interest in the
S/370 target. In my opinion there are 3
major platforms - Windows, Unix and MVS,
but sadly most freeware doesn't target
MVS, even though MVS should be able to
run C90-compliant code.

GCC is already working on MVS, both as host
and target, but I suggest focusing OW on
MVS as a target.

I have a question - does OW produce assembler
prior to producing object code? If so, it is
really only the assembler output we need at
the moment, because that's how GCCMVS works.
It relies on the existing MVS assembler to
do the assembly.

You might like to download the GCCMVS Windows
executable from here:

https://sourceforge.net/projects/gccmvs/files/GCCMVS/GCC%203.2.3%20MVS%208.5/

and see the output like I have shown below.

Basically I think the objective should be to
behave similarly to gccmvs.

But if you use this form of assembler, you
need to target MVS rather than z/Linux, as
I believe z/Linux uses a different format
of assembly. Although I think GNU "as" does
support this style of assembly as part of a
different Linux project, but I've never
used it. I don't run either Linux/x86 or
z/Linux. I run Windows and MVS.

Note that the GCC machine definition may be
useful as a reference too. That is i370.md
and at the above link you can also find a
source code patch to be applied on base
GCC 3.2.3 in order to produce the i370.md
that I use.

BFN. Paul.



C:\scratch\ow2>type foo.c
extern int a;
extern int b;

int foo(void)
{
    return (a + b);
}

C:\scratch\ow2>gccmvs -S -O2 foo.c

C:\scratch\ow2>type foo.s
         COPY  PDPTOP
         CSECT
* Program text area
         DS    0F
* X-func foo prologue
FOO      PDPPRLG CINDEX=0,FRAME=88,BASER=12,ENTRY=YES
         B     @@FEN0
         LTORG
@@FEN0   EQU   *
         DROP  12
         BALR  12,0
         USING *,12
@@PG0    EQU   *
         LR    11,1
         L     10,=A(@@PGT0)
* Function foo code
         L     2,=V(B)
         L     3,=V(A)
         L     15,0(3)
         A     15,0(2)
* Function foo epilogue
         PDPEPIL
* Function foo literal pool
         DS    0F
         LTORG
* Function foo page table
         DS    0F
@@PGT0   EQU   *
         DC    A(@@PG0)
         END

C:\scratch\ow2>

---
This email has been checked for viruses by AVG.
http://www.avg.com

Back to openwatcom.users.assembler | Previous | NextNext in thread | Find similar


Thread

Re: S/370 Assembler, Disassembler Paul Edwards <mutazilah@gmail.com> - 2018-04-07 08:38 +1000
  Re: S/370 Assembler, Disassembler Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2018-04-14 16:44 +0800
    Re: S/370 Assembler, Disassembler Frank Beythien <fbeythien@gmx.de> - 2018-04-14 18:24 +0200

csiph-web