Forum Discussion

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

assemble lauguage for nios2

where can i find some unabridged assemble programs which can run well on nios2?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I also want to ask the next question?

    the r(26) gp 'function?

    it is the program counter ?

    thanks!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The exception handler is written in assembly, as is crt0.S. However, it's probably best to start with C code and have the compiler generate the assembly for you. You can do this with the "-S" switch. Just Google for details of how to do this, there are many examples on the internet.

    Regarding your second question, I think it should be apparent which registers are which by debugging a simple program and glancing at the contents of the registers tab.

    - slacker