Forum Discussion
Altera_Forum
Honored Contributor
20 years agoyancharles,
You can call assembly functions in NIOSII. I resolved the problem that I was having originally when I started this thread. All you have to do is make sure that your function call has a .global reference to the name (As shown in the code snippet) create a prototype for the function and you can call the routine. If you look in the programers reference manual you can see how to pass information to your function. registers r4, r5, and so on are used to pass information to your function and returning data is through registers r2,r3. Also remember that NIOSII and first gen. NIOS has some changes in the instruction set. so you may need to modify your assembly function. Good Luck, Btaylor And thanks to scott for giving me some clues on the trouble I was having!!! It was a linking problem!!