Post Reply 
User-defined functions in Free42
01-12-2021, 08:24 PM
Post: #18
RE: User-defined functions in Free42
In order to know which stack registers to restore, and what to restore them to, you need to know the number of outputs and inputs. For example: FUNC 11, one parameter and one output, returns RYZT, while FUNC 21, two parameters and one output, returns RZTT. Etc.

FUNC does save the entire stack, it has to do that anyway because RTNERR must restore the entire stack and LASTx to their original state. But when the function ends with RTN, RTNYES, or RTNNO, it restores the stack accoring to the parameter originally passed to FUNC.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: User-defined functions in Free42 - Thomas Okken - 01-12-2021 08:24 PM



User(s) browsing this thread: 1 Guest(s)