gtpc2m1u | C/C++ Language Support User's Guide |
This function transfers control to a TPF segment without return, clearing all program nesting levels.
Format
#include <tpfapi.h> void entdc(void (*segname)(), struct TPF_regs *regs); void __ENTDC(const char *segname, struct TPF_regs (regs);
Migration to ISO-C consideration |
---|
The TARGET(TPF) entdc function can handle segment names that are #pragma mapped. The ISO-C entdc macro only handles #pragma mapped names if the first 4 characters are the same as the program name. |
TARGET(TPF) restriction |
---|
Only calls to certain TPF API functions permit the use of function pointers. Pointers to functions are not supported in TARGET(TPF); their use will normally result in a compiler error. |
Normal Return
Not applicable.
Error Return
Not applicable.
Programming Considerations
TARGET(TPF) restriction |
---|
All auto-storage blocks, stack blocks, and static blocks are released when this macro is called. |
Examples
The following example initializes the R1 slot in the TPF_regs structure with the address of a message block and initializes the R2 slot with the address in the CBRW on level D8. The entdc macro then transfers control to program FMSG without return, passing the values in the indicated registers.
#include <tpfapi.h> void FMSG(); struct TPF_regs *regs = (struct TPF_regs *)&(ecbptr()->ebx000); char *msg_text;
·
·
·
regs->r1 = (long int)msg_text; regs->r2 = (long int)ecbptr()->ce1cr8; entdc(FMSG, regs);
Related Information