<sect1><tt>#pragma wrapped-call (<push&rt;, <name>, <identifier>)</tt><label id="pragma-wrapped-call"><p>
This pragma sets a wrapper for functions, often used for trampolines.
- The name is either a function returning void and taking no parameters,
- or the address of an array in memory (for a RAM trampoline). The identifier
- is an 8-bit number that's set to tmp4.
+ The name is a function returning void and taking no parameters.
+ The identifier is an 8-bit number that's set to tmp4.
The address of the function is passed in ptr4.
Entry = FindSym(Name);
/* Check if the name is valid */
- if (Entry && Entry->Flags & (SC_FUNC | SC_STORAGE)) {
+ if (Entry && Entry->Flags & SC_FUNC) {
PushWrappedCall(Entry, Val);
Entry->Flags |= SC_REF;
}
-unsigned char array[30];
-#pragma wrapped-call(push, array, 0)
-#pragma wrapped-call(pop)
-
#pragma wrapped-call(push, trampoline_inc, 0)
void func2() {