gtpg2m49 | General Macros |
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
|
Entry Requirements
Return Conditions
Control is returned to the function that originally called the external program containing the TMSPC|TMSEC interface.
Programming Considerations
Functions that return structures (by value) and floating point types do not return their values in registers. Rather, the first fullword of the C language parameter list passed to such a function contains the address of the object into which the function must store the return value.
Examples