Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > openwatcom.users.assembler > #16 > unrolled thread
| Started by | Paul Edwards <mutazilah@gmail.com> |
|---|---|
| First post | 2018-04-07 08:38 +1000 |
| Last post | 2018-04-14 18:24 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to openwatcom.users.assembler
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
| From | Paul Edwards <mutazilah@gmail.com> |
|---|---|
| Date | 2018-04-07 08:38 +1000 |
| Subject | Re: S/370 Assembler, Disassembler |
| Message-ID | <6.mutazilah@gmail.com> |
> 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
[toc] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2018-04-14 16:44 +0800 |
| Message-ID | <pasev9$ap1$1@www.openwatcom.org> |
| In reply to | #16 |
Paul Edwards wrote: >> Please discuss assembler and disassembler >> issues for the S/370 target in this thread. > > 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. Hi, if I remember correctly, I read somewhere that OpenWatcom does not produce assembly before object code; it produces tho object code directly from the C code. Now, I don't know where I read that; nor am I sure that OpenWatcom cannot produce assembly from the C code. -- Johann | email: invalid -> com | www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | twitter: @myrkraverk
[toc] | [prev] | [next] | [standalone]
| From | Frank Beythien <fbeythien@gmx.de> |
|---|---|
| Date | 2018-04-14 18:24 +0200 |
| Message-ID | <pat9tn$kov$1@www.openwatcom.org> |
| In reply to | #17 |
Am 14.04.2018 um 10:44 schrieb Johann 'Myrkraverk' Oskarsson: > Paul Edwards wrote: >>> Please discuss assembler and disassembler >>> issues for the S/370 target in this thread. >> >> 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. > > Hi, if I remember correctly, I read somewhere that OpenWatcom does not > produce assembly before object code; it produces tho object code > directly from the C code. That is correct, but you can use the owcc -S option for assembler output > Now, I don't know where I read that; nor am I sure that OpenWatcom > cannot produce assembly from the C code. It is produced by disassembling the object code (program wdis) CU Frank
[toc] | [prev] | [standalone]
Back to top | Article view | openwatcom.users.assembler
csiph-web