gtpg2m49General Macros

TMSEC-Epilog for ISO-C Functions Calling TPF Macro Services

This general macro is used with ISO-C support. It is required for writing library functions in assembler language and is the last executable code in the program.

The TMSEC macro completes an interface between non-C language external functions (such as assembly language library routines) and ISO-C programs. The interface begins with a call (in the external function) to the TMSPC macro (normally at the beginning of the program) which preserves the C environment. The TMSEC macro, normally at the end of the program, restores registers after recreating the environment and returns to the calling C language program. In addition, if a stack frame was allocated by TMSPC, it is released by TMSEC.

The TMSPC-TMSEC interface can be used for migrating TARGET(TPF) C library functions to ISO-C.

Format




label
A symbolic name can be assigned to the macro statement.

RC
Specifies whether and how a value is returned to the caller. This parameter is required and there is no default.

Rx
A general purpose register that contains a value to be returned to the calling function. The TMSEC macro passes the return value back to the caller in R15 according to C language protocol.

NONE
The function does not return a value through a register.

Entry Requirements

Return Conditions

Control is returned to the function that originally called the external program containing the TMSPC|TMSEC interface.

Programming Considerations

Examples

None.