gtpc3m0vConcepts and Structures

Entry Control Block (ECB) Overview

The entry control block, usually called the ECB, is the cornerstone of the application program reentrant structure in the TPF system. Use of the ECB allows one program to service multiple Entries because an ECB is private to an Entry. Within the ECB, there are work areas that are ordinarily an integral part of a non-reentrant program. Since reentrancy is a basic attribute of a TPF application program, the ECB is the facility provided in support of reentrancy.

The ECB consists of main storage blocks and is the link between the TPF system and the application, as well as between the other program segments (ECB-controlled programs) within the application package. That is, portions of the ECB are defined as an application interface (API).

Format of an ECB

See Figure 19 for a diagram of the ECB.

The ECB is 12KB long and is referred to in three 4KB page segments.

Accessing the ECB

The address of the ECB is in the ECB register, which is part of the interface when control is passed from the control program to the application. OPZERO initializes the ECB register when the ECB is created.

By convention of the TPF system, the ECB register is register 9.

Creation of an ECB

An ECB is created for an Entry by OPZERO as described in Step 4b. OPZERO Creates and Initializes an ECB.

Figure 19. Entry Control Block (ECB)