Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

How to run Assebly Code from Lab Exercises

I just found great lerning examples at Altera DE2 Tutorials and Lab Exercises http://www.altera.com/education/univ/mater...lab-manual.html (http://www.altera.com/education/univ/materials/manual/unv-lab-manual.html)

Here is Lights.s code from Computer Organization Tutorials http://www.altera.com/education/univ/mater...uction_vhdl.pdf (http://www.altera.com/education/univ/materials/manual/labs/tut_sopc_introduction_vhdl.pdf)

.include "nios_macros.s"
.equ Switches, 0x00001800
.equ LEDs, 0x00001810
     GFUNC _start
       movia r2, Switches
       movia r3, LEDs
       loop: ldbio r4, 0(r2)
       stbio r4, 0(r3)
       br loop
BREAK

there are described steps how to run this code using Altera Debug Client.

Debug client don't work without hardware (I just ordered this dev.kit for 150$).

I need some example of how to compile this code using Nios II IDE and debugg it with Instruction set Simulator.

I checked all forum + google and didn&#39;t found useful example. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
No RepliesBe the first to reply