On Tue, Mar 22, 2016 at 10:27:33PM -0400, Mario Beaulieu wrote: > Hi, > > Is there a maximum number of items that can be passed on the data stack as > parameters to a c-function? I'm calling a function with 13 parameters and, at > execution time I get an "Invalid memory address" message and the program > stops.
There is no planned limit. I just tried a C function wrapper with 13 parameters, and it worked: c-library xxx \c #define test1(n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13) n1+n2+n3+n4+n5+n6+n7+n8+n9+n10+n11+n12+n13 c-function test1 test1 n n n n n n n n n n n n n -- n end-c-library 2 2 2 2 2 2 2 2 2 2 2 2 2 test1 . > The function is part of a C library (wiringPi on the Raspberry Pi) that is > used by a large public. All other c-functions work fine. We may be able to help more if you post the source code; the prototype of the C function may also help. - anton