MVS TOOLS AND TRICKS OF THE TRADE July 1992 Sam Golob MVS Systems Programmer sbgolob@cbttape.org SOME ASSEMBLER THOUGHTS - THE NEW HIGH LEVEL ASSEMBLER - PART I. Sometimes you really can change the world. It's important not to be cynical about this. Or even if you are cynical, don't let that stop you from taking action and doing something about a problem. Last week, I was pleasantly shocked by IBM's announcement number 292-244 for their new High Level Assembler, dubbed "HLASM" for short. I had nearly given up hope. This new assembler, which is implemented for MVS, VM, and VSE, claims to incorporate most features of the SLAC Mods to Assembler H and other enhancements suggested by users (see this column from the February 1990 issue). It seems that my 250 phone calls and many other people's efforts: those of the SHARE Assembler Committee, the SHARE Languages Project, the "Assembler Indignation Project" at GUIDE, SHARE Europe, G.U.I.D.E. Europe and the IBM representatives to these organizations, were not in vain after all. IBM's announcement 292-244 acknowledges all of these contributors as being input to its decision to open up Assembler enhancement. John Ehrman, an IBM'er who was pivotal in this effort, has told me that the keywords most responsible for achieving this change, from IBM inertia to IBM progress, could be summarized as "diligence" and "persistence" on the part of the IBM user groups, especially SHARE. I feel it is only proper that the beneficiaries of the new assembler (all of you out there) should know a few of the names of people whose contributions were significant. Above all, we must acknowledge Gregory J. Mushial, whose dissatisfaction with the assembler as it was, led him to write the "SLAC Mods", a package of about 50 enhancements to the existing Assembler H. We must emphasize that Greg could only have done this job because Assembler H was available in source code, without the odious OCO restrictions. For years, IBM rejected user requirements to absorb the SLAC Mods because it was stated that they were "technically impossible". Greg's work openly contradicted that. These things had already been achieved, and they could even be benchmarked. Next, it is necessary to recognize the monumental work of Bill Winters, who typed in all the IBM PTF code to Assembler H from microfiche, and who fitted Greg Mushial's SLAC updates on top of the "PTF" updated source code. If it weren't for Bill Winters' work, the user efforts to influence IBM might have died, because people would have thought the technical achievements of the SLAC mods were antiquated. Bill's work proved that they could be as up-to-date as IBM's latest production assembler itself. Finally, I have to mention a list of names. Some key helpers will undoubtedly be left out, and I must apologize for that. But I feel obligated to make known some names of people to whom the entire IBM mainframe community is indebted. We are equally indebted to many other people whose names are not mentioned here. They are: John Ehrman, Nancy Wheeler, Gil Lee, Cindy Craine, and Al Hsia from IBM, whom we dealt with through SHARE. David Andrews, Jerry Callen, David Weintraub, Bill Johnson, Ted Johnston, John Grady Sullivan, Walter Horowitz, Michael Stack, Lloyd Fuller, Michael Lewis, Roger Fajman, Melinda Varian, Gerhard Postpischil, the late Ben Schwarz, and many others gave very significant contributions and help through the SHARE committee. John Melcher is the chairman of the GUIDE committee. There were over 60 people at the GUIDE meetings, as I understand. G.U.I.D.E. Europe and SHARE Europe also helped. Thank you all for your diligence and persistence. Now that we've thanked some people, let's take a preliminary look at what IBM says they've built into the new Assembler. As of this writing, I have access to the IBM announcement and a preliminary copy of the General Information Manual for HLASM. Please see Figure 1 for a summary of user requirements satisfied, taken from the IBM announcement. A SUMMARY OF WHAT YOU'LL GET. IBM has planned the new High Level Assembler, product number 5696-234, to span their mainframe environments: MVS, VM, and VSE. The enhancements are many, and can be divided into several different categories. These are: Language Extensions, Assembly Listing Enhancements, Usability Enhancements, Input-Output Enhancements, and Performance Enhancements. Most of these improvements were inspired by, or were taken from, Greg Mushial's SLAC Mods. Almost all of them were brought to IBM's attention by user group requirements. The I/O extensions are perhaps simplest to explain, so I'll start with them. Greg Mushial had introduced an exit point for intercepting the printout of the assembler listing. IBM developers extended the concept to include exit points for intercepting output or input to all of the High Level Assembler's ddnames. All input or output files to the Assembler can now be accessed by user-written customizations. Speaking of ddnames, IBM has introduced a new one to HLASM, called SYSADATA, which was not in the SLAC Mods. SYSADATA is a Variable Blocked file containing many kinds of assembler data records useful in debugging. In summary, the SYSADATA file will contain various record types, corresponding to: the JOB and assembly environment, the Assembly Options, the ESD records describing all CSECTS and DSECTS, each source line, all source errors, all DC or DS instructions, each machine instruction generated, each RLD record, each Symbol record, each symbol's Cross Reference record, each Macro Cross Reference record, the USING map, and all the Assembly Statistics. Give a round of applause to the IBM developers. Next, Assembly Listing enhancements include: a USING map showing all USING and DROP, PUSH and POP statements, the option of showing all active USING statements at each page break, a MACRO cross reference showing the source of all macros, a DSECT cross reference mapping all DSECTs in the program, an improved symbol cross reference showing changed fields and labels which are targets of a branch. There is also a vastly improved assembler summary showing the source dataset(s) and operating system level as well as performance statistics. You can globally turn off PRINT NOGEN with an option setting. And there is much more than that, to help in following program logic and in debugging. I haven't mentioned half of what's there. Language extensions are too numerous to mention in this small space. I'll talk more about them next month. In my opinion, the most important extensions are the "Labeled USINGs" and "Dependent USINGs", which allow the programmer to establish base-displacement addressability without tying up an excessive number of registers. These features had been a part of the SLAC Mods and were absorbed into HLASM. People who had the SLAC Mods and were afraid to use these features because of portability doubts, will now be able to take advantage of them with a clearer conscience. Symbol names which are not referenced externally, can be up to 63 characters long. The underscore is now accepted as an alphabetic character, to make the assembler more compatible with higher level languages. Performance enhancements from the SLAC Mods, and perhaps others, have been introduced into HLASM. The assembler will report if there is enough region space to support an in-core assembly, with no writing to the SYSUT1 spill file. Statistics to count reads and writes to the SYSUT1 file are shown in the assembler summary report. Some algorithms for sequencing macro expansions have been reworked. From what I can surmise, it seems fair to say that HLASM performance is not usually worse than that of its predecessor Assembler H Version 2, when comparable options are run. I'll have to continue this discussion next time. It is exciting to finally see some IBM recognition that system-level coders should get a hint of the service that high-level language coders are receiving. Now all they have to do is recognize that it's to their advantage to cut down on OCO or eliminate it. That'll be the day! But a day has already come. This is exactly what we said when we were talking about IBM absorbing the SLAC Mods into the assembler. Keep the faith and keep up the pressure. Try to make it to SHARE, GUIDE, or your local user group, and good luck. See you next month. * * * * * * * * * * * * * * * * * * * * * * * FIGURE 1. REQUIREMENTS FROM VARIOUS USER GROUPS THAT WERE ACCEPTED FOR INCLUSION IN THE HIGH LEVEL ASSEMBLER. (Quoted from IBM Announcement Number 292-244, dated May 5, 1992.) The following requirements from SHARE are: o Incorporate the SLAC Mods into the assembler o Memory management o In-storage assembly o CSECT/DSECT indicators for the location counter o Active USINGs list o Read and Write references in the symbol XREF o Produce XREF of macros and copy code in assembly o Produce XREF of DSECTS o Terminal output enhancements o Addressability of multiple instances of data area o Multiple DSECTS mapped via one base register o Provide SIZE option o Flag duplicate and overlapping USING ranges o Option to override PRINT NOGEN o Treat underscore as alphabetic in symbols o Allow lower case alphabetics in symbols o Treat blank record as SPACE 1 o Provide user exit to control assembly listing o Document AREAD parameters CLOCKB and CLOCKD o Allow literals within EQU and expressions o Allow EQUated symbols in SETA and SETB o Implement "Line Counter" system variable symbol o Relate symbols to owning DSECT/CSECT o Implement "Current Sequence Field" system variable symbol. The following requirements from SHARE Europe are: o Mixed case symbol namess o Improve diagnostics for macro writers o Control-block mapping. The following requirements from GUIDE are: o Date and time of object modules o Produce XREF of macros o Support section type in system variables.