Browse Prior Art Database

Pre Assembly Macro Expansion Program

IP.com Disclosure Number: IPCOM000087735D
Original Publication Date: 1977-Mar-01
Included in the Prior Art Database: 2005-Mar-03
Document File: 3 page(s) / 57K

Publishing Venue

IBM

Related People

Gschwend, A: AUTHOR

Abstract

Compilers producing macro-instructions instead of an object module should be less expensive in design, development, and maintenance and have better reliability, availability, serviceability (RAS) characteristics. They would consist of a syntax and conversion phase-producing macro-instructions, a macro library for macro expansion, and any kind of assembler. The basic flow of such a compiler is shown in Fig. 1, alternative A. The main disadvantage of this design is in the quality of compiler performance resulting from the assembler and in particular from the macro expansion phase.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 3

Pre Assembly Macro Expansion Program

Compilers producing macro-instructions instead of an object module should be less expensive in design, development, and maintenance and have better reliability, availability, serviceability (RAS) characteristics. They would consist of a syntax and conversion phase-producing macro-instructions, a macro library for macro expansion, and any kind of assembler. The basic flow of such a compiler is shown in Fig. 1, alternative A. The main disadvantage of this design is in the quality of compiler performance resulting from the assembler and in particular from the macro expansion phase.

A significant improvement in performance can be achieved by replacing the macro expansion phase of the assembler by an assembler-independent macro expansion program, as shown in Fig. 1, alternative B. The prerequisite for this is a general purpose compiler which converts macro-ins instructions into "macro processing modules". These are then included in the high-level programming language compiler for performing macro expansions. This macro expansion method is about 20 to 40 times faster than that of the F-Assembler.

The following components of the macro expansion program are produced by means of a program generation process: 1. A control section for constants, variables, tables and work areas. 2. The macro processing main program which has the following functions:. - input and checking of macro (and other; instructions generated by the first compiler phase, - parameter extraction, - allocation and initialization of local variables, - invocation of macro processing modules, - macro processing subroutines, - output of assembler statements. 3. One macro processing module per macro definition in the higher level program language macro library. These modules are invoked by the macro processing main program. They execute the statements in the macro definition body, invoking, if necessary, subroutines in the macro processing main program for data conversion, statement output and inner macro call.

The macro expansion program generation, shown in Fig. 2, consists of the following steps: (a) Generation of a control section for constants, variables, tables, and work areas. The program "GBLGEN" (1) reads all hi...