Arm/callparam
From ASMBits
arm/func_pack3Previous
Nextarm/sum_args20
Write a function named call1234 that calls the function secret with four parameters with values 1, 2, 3, and 4. It should return the result of secret(1,2,3,4). The function secret is provided for you: Your submitted code should not contain that function, or you will end up calling your version rather than the one that is provided for you.
int call1234 () {
return secret(1,2,3,4);
}
Recall that the first 4 parameters to a function are passed through registers r0 through r3. Also don't forget to save lr, as the function call will clobber it. (See Hint for an alternative method).
Expected solution length: Around 8 lines.
Sample Input
No input
Sample Output
1
arm/func_pack3Previous
Nextarm/sum_args20