Browse Prior Art Database

Standard Machine Code Threading

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

Publishing Venue

IBM

Related People

Larson, LE: AUTHOR

Abstract

It is often required that existing program modules, generated by standard techniques, interact with modules that are generated using threaded coding techniques. An interface or procedure to accomplish this will thereby provide the advantages of threaded code to subroutines that use a previously defined coding convention for prologue and epilogue procedures. One situation that can benefit from this occurs when the topic of the threaded code is introduced after a major portion of the code system has been put together. The essence of the combinational process described herein is to decide what the string entry protocol will be. In the case described above, it is essential that the protocol consist of an instruction because the previous machine codes have a prologue starting with machine code.

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

Page 1 of 2

Standard Machine Code Threading

It is often required that existing program modules, generated by standard techniques, interact with modules that are generated using threaded coding techniques. An interface or procedure to accomplish this will thereby provide the advantages of threaded code to subroutines that use a previously defined coding convention for prologue and epilogue procedures. One situation that can benefit from this occurs when the topic of the threaded code is introduced after a major portion of the code system has been put together. The essence of the combinational process described herein is to decide what the string entry protocol will be. In the case described above, it is essential that the protocol consist of an instruction because the previous machine codes have a prologue starting with machine code.

Operation. The operation of the list-linking process is best understood by reference to and review of the following code sequence, written in macro-assembler for the IBM System/370, and the explanatory steps listed below. RETURN POP I LOAD REG I WITH TOP OF STACK

GO POP I LOAD REG I WITH TOP OF STACK

LGO L W,0(I) GET CONTENT LIST ELEMENT

LA I,4(I) POINT TO NEXT LIST ELEMENT

PUSH I SAVE RG I ON TOP OF STACK

BALR 14,W BRANCH TO TOP OF LIST

B GO HANDLE RETURN FROM EXISTING

CODE LINKAGE

B LCO PROCESS THE LIST

(*)

(*)

SAMPLE BAL I,4(14) SIGNAL PROCESS LIST DC AL4 (STEP 1)

DC AL4 (STEP 2)

DC AL4 (RETURN)

(*)

(*)

IPL DC AL4 (SAMPLE) SPECIAL STARTUP LIST.

Step 1 - Initially, register I has the address of IPL and program execution starts with LCO.

Step 2 - Register W is loaded with the address of the "called" list.

Step 3 - Register I is changed to point to an address constant following the constant just loaded.

Step 4 - The content of register I is put onto an address stack for future reference.

Step 5 - Control is transferred to the routine indicated in register W, retaining a return address in register 14.

Step 6 - The routine (SAMPLE) returns, leaving in register I, the address of the next list element to be used.

Note that the return is to the branch to LGO to

continue the p...