This general macro creates an independent entry control block (ECB) for
immediate or deferred processing. The ECB is created on the same
I-stream, in the same subsystem, and subsystem user as the creating
ECB.
A storage block on data level 0 and an optional variable-sized
(0-104 bytes) parameter list are passed to the created ECB. The
control program moves the specified core block reference word (CBRW) and the
parameters into an interim block of available storage and adds the block to
either the deferred processing list or the postinterrupt (ready) list.
Operational Program Zero (OPZERO) initializes an ECB with the CBRW on data
level 0, initializes the parameters in the work area, releases the interim
block, and starts the specified program with an Enter with No Return
(ENTNC).
Format
- label
- A symbolic name can be assigned to the macro statement.
- prog
- The name of the program that is to be activated with the created
ECB. The name must be four character starting with an alphabetic
character (A through Z). This method generates a V-con which is
resolved at link edit time into a Program Allocation Table (PAT)
displacement. This is the preferred method for specifying the program
name.
- PROGRAM
- The name of the program can be provided using the PROGRAM
parameter.
Either the positional parameter 'prog' or the keyword parameter
'PROGRAM' is required. This method generates constant data
which will be used at execution time to determine the Program Allocation Table
(PAT) displacement. This method has a longer path length than the one
described above.
- prog
- The name of the program that is to be activated with the created
ECB.
- (reg)
- A register (R0-R7) that contains the address of the program
name.
- datalevel
- The data level of the block to be passed to the created ECB. The
valid values are D0 through DF.
When the new ECB is dispatched, the block from the data level of the
issuing ECB will be available to the new ECB on its data level 0.
When control is returned to the issuing ECB, the storage block previously
attached at the level is detached and is no longer available for use by the
issuing ECB.
- DECB=(reg)|label1
- The label or general register (R1-R7) containing the address of the
data event control block (DECB) that contains the block to be passed to the
created ECB.
When the new ECB is dispatched, the block from the DECB of the issuing ECB
will be available to the new ECB on data level 0.
When control is returned to the issuing ECB, the storage block previously
attached at the DECB is detached and is no longer available for use by the
issuing ECB.
- R
- Specifies that the created ECB is to be dispatched with a high
priority. If you specify this parameter, the ECB is placed on the post
interrupt (ready) list.
- D
- Specifies that the created ECB is to be dispatched with a low
priority. If you specify this parameter, the ECB is placed on the
deferred process list.
Entry Requirements
- The ECB reference register (R9) contains the address of the ECB issuing
the CREEC macro.
- R14 must contain the number of bytes of parameters to be passed to the
created ECB work area. If there are no parameters to pass, R14 must be
set to zero.
- R15 must contain the address of the start of the parameters which are to
be passed.
- There must be a storage block on the ECB data level or DECB
specified. If a level or DECB is not specified, there must be a storage
block on ECB data level 0.
Return Conditions
- Control is returned to the next sequential instruction (NSI).
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
- The specified CBRW in the ECB that issued the CREEC macro is set to
indicate 'no block held'.
Programming Considerations
- This macro can be executed on any I-stream.
- The ECB reference register (R9) must contain the address of the ECB
issuing the CREEC macro.
- No linkage is provided between the created ECB and the active program
segment using this macro.
- There may be up to 104 bytes of parameters passed to the created
ECB's work area.
- The ECB issuing the CREEC macro may be forced into a WAITC if there is
insufficient storage available to buffer the parameters. When adequate
storage is available, the CREEC macro is executed and control is returned to
the next sequential instruction (NSI).
- The use of this macro should be restricted in order to prevent
depletion of storage.
- Using the PROGRAM parameter sacrifices some performance.
Consequently its use should be monitored.
- The program to be activated must have been allocated via the system
allocator (refer to TPF System Installation Support
Reference).
- When activated, the specified program receives control in its allocated
addressing mode. The condition code and the contents of registers
R0-R7, R14, and R15 are unpredictable.
- System errors can occur for the following reasons:
- No core block is held at the specified ECB data level or DECB
- More than 104 bytes of parameters are passed
- The specified program has not been allocated.
- The core block specified by the ECB data level or DECB is released when
this macro is processed. Once the core block is released, references to
it cause errors. For example, an error results when the parameter list
is put in the core block.
- This macro can be used only within a subsystem to pass a storage block to
another program. Whenever possible, a storage block should be passed to
another program using a ROUTC macro. This macro has been supplied to
provide compatibility for some existing applications.
- In addition to the normal macro trace information the macro trace for this
macro contains the name of the macro being returned to.
- If you use this macro to create an ECB that will enter a dynamic load
module (DLM) with an entry point defined by the C language main
function, the TPF system assumes that any core block attached to data level 0
(D0) contains a command string that will be parsed into argc and
argv parameters for the main function. See TPF Application Programming for more information about
the main function.
- If the location of the data event control block specified by the DECB
parameter does not refer to a valid DECB, control is transferred to the system
error routine and the entry is exited.
Examples
None.