Altera_Forum
Honored Contributor
21 years agoNios assemble
Hi,everyone.
In the debug perspective,we can see the code of function _start( ).It is only exits in assemble form. 0x0000035c <main>: addi sp,sp,-12 0x00000360 <main+4>: stw ra,8(sp) 0x00000364 <main+8>: stw fp,4(sp) 0x00000368 <main+12>: mov fp,sp 0x0000036c <main+16>: movi r2,9 0x00000370 <main+20>: stw r2,0(fp) 0x00000374 <main+24>: movhi r4,0 0x00000378 <main+28>: addi r4,r4,10912 0x0000037c <main+32>: call 0x3ac <printf> 0x00000380 <main+36>: movhi r4,0 0x00000384 <main+40>: addi r4,r4,10936 0x00000388 <main+44>: ldw r5,0(fp) 0x0000038c <main+48>: call 0x3ac <printf> 0x00000390 <main+52>: movhi r3,1 0x00000394 <main+56>: addi r3,r3,2080 0x00000398 <main+60>: movui r2,45220 0x0000039c <main+64>: stw r2,0(r3) 0x000003a0 <main+68>: movi r4,3000 0x000003a4 <main+72>: call 0xcb4 <usleep> 0x000003a8 <main+76>: br 0x390 <main+52> I want to know the function of the above code.what is the _start function? And,especially movui r2,45220 what is it mean? Do I need to know about all of this? Thank you !very much.