Browse Prior Art Database

Standardized Subroutine Linkage Convention for DOS

IP.com Disclosure Number: IPCOM000073570D
Original Publication Date: 1971-Jan-01
Included in the Prior Art Database: 2005-Feb-22
Document File: 3 page(s) / 67K

Publishing Venue

IBM

Related People

Duffie, CA: AUTHOR

Abstract

A method used to standardize the convention for subroutine linkage in DOS/BAL applications is described. The method requires the use of two macros, PSAVE and PRETN, which eliminate the requirement for the programmer to be concerned with items such as base register initialization, register saving, and restoring save area generation, and save area chaining; and which assure that subroutine and save area linkages are conventional.

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 57% of the total text.

Page 1 of 3

Standardized Subroutine Linkage Convention for DOS

A method used to standardize the convention for subroutine linkage in DOS/BAL applications is described. The method requires the use of two macros, PSAVE and PRETN, which eliminate the requirement for the programmer to be concerned with items such as base register initialization, register saving, and restoring save area generation, and save area chaining; and which assure that subroutine and save area linkages are conventional.

The current DOS Assembler provides the macros SAVE and RETURN, but the function of these macros is limited to merely saving and restoring the registers. This limited capability can cause undue stress to the user in his implementation and debugging of multilevel subroutine structured programming systems.

The description of the PSAVE and PRETN macros diagrammed in the drawing is:

The PSAVE macro saves the general purpose registers in

the calling program's save area, initializes the subroutine's

base register (s), back-chains save areas, optionally defines

the subroutine save area, and establishes resister 13

addressability to the subroutine save area. Multiple PSAVE

macros can be used if the subroutine is to have more than one

entry point.

The name field is required and is restricted to a

maximum of 7 characters in length. This field should be

identical to the entry point parameter of the CALL macro

in the calling program. The name field will be defined as

an entry point in the subroutine.

The operands, RB or PB1 through PBN, specify the program

base registers to be used by the subroutine. If the

subroutine

is expected to exceed 4k bytes in size, then more than one

base should be specified and enclosed within parentheses.

The operand, save area name, is optional. It must be

specified if this subroutine will call a lower level routine.

For core storage savings, it need not be specified if this

subroutine is the lowest level subroutine called. If

specified, the macro expects an 18 full word save area for

full save area chaining capability. If not specified, the

macro will generate a one word save area for save area

back-chaining capability.

The operand, DEF, is optional. If specified, the macro

will generate...