Posted By
Harry Potter on 2024-02-20 19:42:49
| Re: cc65/c16: problem w/ Cubbyhole technique
I believe I know what the bug in the 128k Plus4 version of AdvSkel65 is: I'm calling the verb functions the wrong way. I have the pointer to the function declared as:
void (* vfunc) (void);
and the code that reads the address and delegates the call as:
------------------- #if defined __USEFARMEM__ && !defined __C128__ vfunc=hidereadw((void*)&Verb[Vrb].vdo); (*vfunc) (); #else (*Verb[Vrb].vdo) (); #endif -------------------
__USEFARMEM__ is declared on the compile command line, and hidereadw() reads the word at the given address in Hannes memory. When I add test code, the verb #, name and address are all correct, but, if I use verb other than the first in its database, I get either the wrong messages or a system crash. BTW, all the verb functions are declared as void vVerb (void);.
|