Browse Prior Art Database

Re Enterable Programming

IP.com Disclosure Number: IPCOM000073799D
Original Publication Date: 1971-Feb-01
Included in the Prior Art Database: 2005-Feb-23
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Utley, KL: AUTHOR

Abstract

This programming process permits calling and writing re-enterable code for the IBM System/1130 or similar processors. Re-enterable code is usually defined as code executable by more than one program at a time and which does not modify itself.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Re Enterable Programming

This programming process permits calling and writing re-enterable code for the IBM System/1130 or similar processors. Re-enterable code is usually defined as code executable by more than one program at a time and which does not modify itself.

Re-enterable code has not been provided on IBM System/1130 type computers because of the lack of re-enterable subroutine call instructions, the operation of the index instructions, and hardware to temporarily protect against re-entry. However, the IBM 1130 does have direct and indirect addressing, memory reflected index registers, programming that performs register housekeeping for interrupts, interrupts inhibited on same or lower priority levels, and a noninterruptible storage increment/decrement instruction. If the aforementioned re-enterable code definition is extended to include code which modifies itself as long as the modification does not affect the output of the code, such an extension prevents the code execution in read-only storage but permits the code execution by more than one program at a time.

There are two areas in designing re-enterable code: one is calling the code, the other is writing the code. Assuming existing assemblers and compilers, re- enterable code can only be written in assembler language. However, re- enterable subroutines may be called by either assembler language or FORTRAN programs as described below.

Calling A Re-enterable Subroutine: The subroutine-call instruction can be preceded by another instruction which places the return link in a location saved and restored by interrupt programming, such as an index register, accumulator, or accumulator extension. Accordingly, the re-enterable subroutine called uses that return link and ignores the return link usually stored by the subroutine - call instruction. The new instruction in the calling sequence can be a load index, load-accumulator, or even a load-double (acc. and acc. ext.) instruction. The re-enterable call (two instructions) can be generated for the assembler user by writing and invoking a macro or by direct coding the two instructions.

However, the FORTRAN user must write and use a special assembler language subroutine to call a re-enterable subroutine in FORTRAN. There must be a separate special subroutine for the mainline level of operation and for each level of interrupt priority.

To call re-enrerable subroutine A with parameters x and y, the FORTRAN user names special subroutine B with parameters, A, x, and y, in that order. Subroutine B loads the predefined register with the location addres...