From ASMBits


Write a function named func that does nothing and simply returns.

The problems in this collection require you to write functions, rather than a program that simply ends with an infinite loop, unlike some other assembly programming exercises you may have seen. One side effect is that even your top-level function must follow calling conventions, and will need to save/restore registers as necessary.

If your function correctly returns, the test output will show Test completed. Otherwise, if your function doesn't return correctly, or if it takes too long to run, it shows Test did not complete.

We usually show you the results of a few easy test cases, but we keep some of the harder test cases secret and show only Correct/Incorrect.

The code following the _start label is for your convenience in writing a program to test your function. There will usually be an example test case written for you to get a feel for what the test input is. Use it as a starting point to test more challenging test input. The _start label is not used when judging: the test code directly calls your function.

Expected solution length: Around 1 line.

Sample Input

[No input]

Sample Output

[No output] 

Nios II uses the ret instruction to return from a function

Write your solution here

Upload a source file...