diff --git a/doc/cc65.sgml b/doc/cc65.sgml index 2e480e4c3..3689c0b35 100644 --- a/doc/cc65.sgml +++ b/doc/cc65.sgml @@ -4,7 +4,7 @@
+#pragma wrapped-call (push, <name>, <identifier>) This pragma sets a wrapper for functions, often used for trampolines. - 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. + The name is a function returning - void mytrampoline(void); +/* Note that this code can be in a header. */ +void mytrampoline(void); /* Doesn't corrupt __AX__ */ - #pragma wrapped-call (push, mytrampoline, 0) - void somefunc(void); - #pragma wrapped-call (pop) +#pragma wrapped-call (push, mytrampoline, 5) +void somefunc1(void); +void somefunc2(int, char *); +#pragma wrapped-call (pop)
This pragma sets a wrapper for functions, often used for trampolines. - 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. + The name is a function returning - void mytrampoline(void); +/* Note that this code can be in a header. */ +void mytrampoline(void); /* Doesn't corrupt __AX__ */ - #pragma wrapped-call (push, mytrampoline, 0) - void somefunc(void); - #pragma wrapped-call (pop) +#pragma wrapped-call (push, mytrampoline, 5) +void somefunc1(void); +void somefunc2(int, char *); +#pragma wrapped-call (pop)