Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!www.openwatcom.org From: Paul Edwards Newsgroups: openwatcom.users.assembler Subject: Re: S/370 Assembler, Disassembler Date: Sat, 7 Apr 2018 08:38:00 +1000 Organization: Private, Sydney, Australia Lines: 100 Message-ID: <6.mutazilah@gmail.com> NNTP-Posting-Host: 103.217.166.99 X-Trace: www.openwatcom.org 1523054281 10168 103.217.166.99 (6 Apr 2018 22:38:01 GMT) X-Complaints-To: news@www.openwatcom.org NNTP-Posting-Date: Fri, 6 Apr 2018 22:38:01 +0000 (UTC) X-Antivirus: AVG (VPS 180406-6, 04/07/2018), Outbound message X-Antivirus-Status: Clean Xref: csiph.com openwatcom.users.assembler:16 > 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