Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #109

Re: IBM mainframe compilers produce object code or invoke assembler?

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end
From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.compilers
Subject Re: IBM mainframe compilers produce object code or invoke assembler?
Date Wed, 27 Apr 2011 23:22:16 +0000 (UTC)
Organization A noiseless patient Spider
Lines 45
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <11-04-042@comp.compilers> (permalink)
References <11-04-040@comp.compilers>
NNTP-Posting-Host news.iecc.com
X-Trace gal.iecc.com 1303947096 33679 64.57.183.58 (27 Apr 2011 23:31:36 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Wed, 27 Apr 2011 23:31:36 +0000 (UTC)
Keywords object, assembler
Posted-Date 27 Apr 2011 19:31:36 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref x330-a1.tempe.blueboxinc.net comp.compilers:109

Show key headers only | View raw


compilers@is-not-my.name wrote:
> Does anyone happen to know if the traditional IBM language products like
> COBOL, PL/I, FORTRAN etc. invoke the assembler internally to produce object
> code, or if they produce object code directly?

All the ones I know of generate code directly.  They also can produce
a listing of the generated code, usually in a form that would not be
acceptable as input to an actual assembler.

> If they produce object code directly, what is the reason that
> approach was chosen instead of invoking the assembler?

The OS/360 assembler F, among others, is pretty slow.  I believe
it uses four passes.  The XF assembler and Assembler G from
Waterloo are similar, but with some consolidation to reduce
the number of passes.  (And intermediate files between the passes.)

> What are the benefits and disadvantages of the possible approaches?

> It seems to me a little risky to generate object code since
> presumably the assembler will always be updated as part of the base OS
> deliverable but then again maybe that's also a moving target to be avoided.

As far as I know, the main advantage of the indirect method is that
it allows the assembler to worry about addresses and offsets.

For a forward reference, you don't know the address until sometime
later.  For direct generated code, you have to keep it in memory until
you have the offset.  Well, there is another way with the OS/360
object module format, and that is that you can write out the offset
later.  Each card has a starting address on it.  As far as I know,
though, that wasn't usual for compilers.  (It was commonly used for
debug patching to save the time of running the assembler.  Some
routines have a patch area so you can add instructions.)

I do remember stories about older machines that generated assemblable
output.  One is about an assembler that used the first four characters
of labels for its symbol table hash function, and the corresponding
compiler that generated labels of the form XXXXnnnn where the XXXX
were actual C'XXXX' characters, and the nnnn were digits.

-- glen
[IBM Assembler H and its descendant HLASM are a lot faster, but they're
not part of the base system. -John]

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: IBM mainframe compilers produce object code or invoke assembler? compilers@is-not-my.name - 2011-04-27 21:19 +0000
  Re: IBM mainframe compilers produce object code or invoke assembler? Thomas David Rivers <rivers@dignus.com> - 2011-04-27 19:05 -0400
    Re: IBM mainframe compilers produce object code or invoke assembler? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-04-27 23:46 +0000
  Re: IBM mainframe compilers produce object code or invoke assembler? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-04-27 23:22 +0000
  Re: IBM mainframe compilers produce object code or invoke assembler? arnold@skeeve.com (Aharon Robbins) - 2011-04-29 07:31 +0000

csiph-web