This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question_ DSP28x_usDelay Subroutine

 Dear All:

 Why label has two symbol “_”and ”__”  in subroutine?

 .def _DSP28x_usDelay
       .sect "ramfuncs"

        .global  __DSP28x_usDelay
_DSP28x_usDelay:
        SUB    ACC,#1
        BF     _DSP28x_usDelay,GEQ    ;; Loop if ACC >= 0
        LRETR

What is difference?

  • Clark Wu said:

     Why label has two symbol “_”and ”__”  in subroutine?

     .def _DSP28x_usDelay
           .sect "ramfuncs"

            .global  __DSP28x_usDelay
    _DSP28x_usDelay:
            SUB    ACC,#1
            BF     _DSP28x_usDelay,GEQ    ;; Loop if ACC >= 0
            LRETR

    What is difference?

    Clark,

    I believe the .global line can be removed.  .def at the top does the same thing and uses the correct number of underscores.  My guess is someone along the line wanted to use .global and used too many underscores (typo).

    Lori