Based on last daily, I did some more testing.
Your link to Calling_convention gave a first help.
In my best understanding reg0 to reg3 are used for getting data.
By testing this, I could get 4 values back, but where is the 5th ?
var adder = E.asm("int(int,int,int,int,int)",
"mov r0,rn", where n is 1 to 3
"bx lr");
Another problem is JsVar, how could this be interpreted ?
I would like to play around with Uint-Arrays.
This one works, but now I want to change a value in the array.
My understanding of C is too poor to get this out of the sources.
var x,i;
x = Uint8Array(10);
for(i = 0; i < 10; i++) x[i] = i;
var adder = E.asm("JsVar(JsVar)",
"bx lr");
adder(x)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Based on last daily, I did some more testing.
Your link to Calling_convention gave a first help.
In my best understanding reg0 to reg3 are used for getting data.
By testing this, I could get 4 values back, but where is the 5th ?
Another problem is JsVar, how could this be interpreted ?
I would like to play around with Uint-Arrays.
This one works, but now I want to change a value in the array.
My understanding of C is too poor to get this out of the sources.