High Level Assembler Option 
Author Message
 High Level Assembler Option

I used to have the number for the HLASM Language group... lost it way
back.

But I've been wondering if anyone else has thought of this (n.b. I'm new
to this group!):  Wouldn't it be nice to have an XREF option that only
lists those DSECT tags that are referenced in the (or any) CSECT?

XREF(SHORT) will show tags that are referenced, even if they are
referenced by another tag within the DSECT.  Usually, you have PRINT
NOGEN around these macros (In fact, almost ALL of our assembler programs
START with PRINT NOGEN.  Giving us the line number of a DSECT TAG being
referenced by another line that is not printed is really (imho) useless.

If the line in the xref is not printed, inhibit the print on the xref
info...

Any other ideas?



Tue, 19 Jan 1999 03:00:00 GMT  
 High Level Assembler Option

Quote:

>XREF(SHORT) will show tags that are referenced, even if they are
>referenced by another tag within the DSECT.  Usually, you have PRINT
>NOGEN around these macros (In fact, almost ALL of our assembler programs
>START with PRINT NOGEN.  Giving us the line number of a DSECT TAG being
>referenced by another line that is not printed is really (imho) useless.

>If the line in the xref is not printed, inhibit the print on the xref
>info...

>Any other ideas?

I'm afraid that your algorithm is a bit too simple: if I generate a
reference to a symbol from a macro such as OPEN or PUT, but do not
print the generated code, I would still want that reference to show up
in XREF(SHORT).

I agree that it would be nice to eliminate all of the references from
A(SYMBOL) inside a DSECT, or SYMBOL1  EQU  *-DATAAREA, but only if we
don't throw out the baby with the bathwater. Maybe we have to control
it explicitly via XREF OFF, XREF ON and PUSH XREF statements.

Fritz Schneider
Peacham {*filter*}netics
Sunnyvale, California
http://www.*-*-*.com/ ~fritz/



Thu, 21 Jan 1999 03:00:00 GMT  
 High Level Assembler Option

Quote:
> I'm afraid that your algorithm is a bit too simple: if I generate a
> reference to a symbol from a macro such as OPEN or PUT, but do not
> print the generated code, I would still want that reference to show up
> in XREF(SHORT).

I may not have stated my objective clearly enough (and to be honest, the
more I think of it, the more I get confused... so bear with me)

Say I have a DSECT, and define some tags, and some of those tags are
redefined....

EB0EB  DSECT ,
TAG1   DS     F
TAG2   DS     F
TAG3   DS     F
       ORG    TAG1
WORK   DS     CL12
$IS$   CSECT ,

If I never reference the tagname 'WORK' in any given CSECT, then I don't
want to see it show up in an XREF.  What you are refering to with the
open or put does not generate a DSECT, does it? It's an executable
macro, which WOULD generate an XREF value.

I think I overstated myself when I put the last line in: "If the linei
nthe xref is not printed, inhibit the print on the xref info".  That
line should be struck.

But for symbols defined within DSECTS that are never referenced in a
CSECT - don't print the xref

Am I clearer this time?

 - John Studt



Thu, 21 Jan 1999 03:00:00 GMT  
 High Level Assembler Option

You could probably do this by writing a post processor for the ADATA file.

I have long intended to do a "global Xref" post processor - be able to
generate a total cross-reference of many references to a large "global"
data area across 50 or 100 separate assemblies.  

Of course, such a project does not generate revenue or get enhancements
out to the customers, so it has remained on the "nice to do in the future"
list.

Rex Widmer
Builder of software archeology tools and other strange programs to help
survive in a legacy based world.



Fri, 22 Jan 1999 03:00:00 GMT  
 High Level Assembler Option

I think that the biggest problem with this suggestion, a good idea that it
is, is that "How does HLASM know that the definition is closely tied with
the DSECT and not required to be xref-ed?".  One could simply say:-
1) because it's defined in the same MACRO, or
2) because 'PRINT NOGEN' is in effect,
but there would always be situations when either of those is true, but you
DO want an xref

The biggest problem with (1) is that MACROs are used for all sorts of
things, not just record layouts, and if the MACRO is used for a substantial
amount of code, the xrefs would probably be wanted.

For option (2) "REQEQU" macros immediately spring to mind.

The best option is to have a special option which could be wrapped around
definitions (e.g. XREFOFF and XREFON asm directives, but that would entail
amending programs.

I must say that I always get pissed off when using "DCBD" because of the
"DCBBITx" equates, perhaps IBM had this cunning plan to shuffle them about
every now and again to keep us on our toes.
Martin


Quote:
> I used to have the number for the HLASM Language group... lost it way
> back.

> But I've been wondering if anyone else has thought of this (n.b. I'm new
> to this group!):  Wouldn't it be nice to have an XREF option that only
> lists those DSECT tags that are referenced in the (or any) CSECT?

> XREF(SHORT) will show tags that are referenced, even if they are
> referenced by another tag within the DSECT.  Usually, you have PRINT
> NOGEN around these macros (In fact, almost ALL of our assembler programs
> START with PRINT NOGEN.  Giving us the line number of a DSECT TAG being
> referenced by another line that is not printed is really (imho) useless.

> If the line in the xref is not printed, inhibit the print on the xref
> info...

> Any other ideas?



Fri, 22 Jan 1999 03:00:00 GMT  
 High Level Assembler Option

Swiss Air has a listing post processor that I beleive does something like
this
among other things.  If memory serves me correctly, it removes from the
XREF
any references that appear to be in the same macro.  Of course the
reference
could actually be in a nested macro and the post processor would still
remove
it.

--


Quote:
> I used to have the number for the HLASM Language group... lost it way
> back.

> But I've been wondering if anyone else has thought of this (n.b. I'm new
> to this group!):  Wouldn't it be nice to have an XREF option that only
> lists those DSECT tags that are referenced in the (or any) CSECT?

> XREF(SHORT) will show tags that are referenced, even if they are
> referenced by another tag within the DSECT.  Usually, you have PRINT
> NOGEN around these macros (In fact, almost ALL of our assembler programs
> START with PRINT NOGEN.  Giving us the line number of a DSECT TAG being
> referenced by another line that is not printed is really (imho) useless.

> If the line in the xref is not printed, inhibit the print on the xref
> info...

> Any other ideas?



Tue, 16 Feb 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. High Level Assembler question

2. FYI: IBM High Level Assembler parser available

3. Info please -- "High Level Assembler"

4. Info please - High Level Assembler - USING at top of page

5. Converting to High-Level Assembler

6. High Level Assembler experiences

7. Assembler vs. high-level languages

8. HLA v1.39 (High Level Assembler) is now available

9. Auto-converting assembler to a higher level language

10. A High level assembler

11. High Level Assembler (HLA)

12. High Level ASM and Low Level ASM

 

 
Powered by phpBB® Forum Software