Document pragma trampoline
This commit is contained in:
@@ -1209,6 +1209,31 @@ parameter with the <tt/#pragma/.
|
|||||||
The <tt/#pragma/ understands the push and pop parameters as explained above.
|
The <tt/#pragma/ understands the push and pop parameters as explained above.
|
||||||
|
|
||||||
|
|
||||||
|
<sect1><tt>#pragma trampoline (<push&rt;, <name>, <value>)</tt><label id="pragma-trampoline"><p>
|
||||||
|
|
||||||
|
This pragma sets a trampoline for functions. 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 value is an
|
||||||
|
8-bit number that's set to tmp4.
|
||||||
|
|
||||||
|
The address of the function is passed in ptr4.
|
||||||
|
|
||||||
|
This is useful for example with banked memory, to automatically
|
||||||
|
switch banks to where this function resides, and then restore
|
||||||
|
the bank when it returns.
|
||||||
|
|
||||||
|
The <tt/#pragma/ requires the push and pop parameters as explained above.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
<tscreen><verb>
|
||||||
|
void mytrampoline(void);
|
||||||
|
|
||||||
|
#pragma trampoline (push, mytrampoline, 0)
|
||||||
|
void somefunc(void);
|
||||||
|
#pragma trampoline (pop)
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>#pragma warn (name, [push,] on|off)</tt><label id="pragma-warn"><p>
|
<sect1><tt>#pragma warn (name, [push,] on|off)</tt><label id="pragma-warn"><p>
|
||||||
|
|
||||||
Switch compiler warnings on or off. "name" is the name of a warning (see the
|
Switch compiler warnings on or off. "name" is the name of a warning (see the
|
||||||
|
|||||||
Reference in New Issue
Block a user