Nios/callparam
From ASMBits
nios/func_pack3Previous
Nextnios/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 r4 through r7. Also don't forget to save ra, as a function call will clobber it. (See Hint for an alternative method).
Expected solution length: Around 8 lines.
Sample Input
No input
Sample Output
1
nios/func_pack3Previous
Nextnios/sum_args20