Nios/load0

From ASMBits

nios/loadPrevious

There is a 32-bit word located at memory location labelled with the label Data. Write a function that reads this word from memory and returns it. Note that the function has no parameters.

int load ();

Expected solution length: Around 3 lines.

Sample Input

No input to function.

Sample Output

r2=0x123

Write your solution here

x
 
1
#Data: .word 0x123        # Uncomment for debugging
2
.global _start
3
_start:
4
    call load
5
    1: br 1b    # Done
6
7
load:
8
    
9
    
Upload a source file...