Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct myValues{ // define my structure
- int ptr2A; // pointer to first float
- float A;
- float B;
- float C;
- float D;
- float E;
- float F;
- }myValues;
- struct myValues my_asm(int ptr2a, float A, float B, float C, float D, float E, float F); // Prototype for the ASM function
- …code here to set values of A-F...
- float* ptr2A = &myValues.A; //get the memory address where A is stored
- myValues.ptr2A = ptr2A; //put that address into myValues.ptr2A and pass to the ASM function
- // now call the ASM code
- myValues = my_asm(myValues.ptr2A, myValues.A, myValues.B, myValues.C, myValues.D, myValues.E, myValues.F);
- mov r5, r1 // r1 has pointer to the first float A
- vdiv.f32 s3, s0, s0 //this line puts 1.0 in s3 for ease in debugging
- vstr s3, [r5] // poke the 1.0 into the mem location of A
- bx lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement