You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • 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)
    
About

Avatar for JumJum @JumJum started