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.

MOV SP,#__stack

The file boot28.inc, part of the source for the RTS libraries, contains the function _c_int00 which includes the line
    MOV      SP,#__stack        ; set to beginning of stack space

Looking at “TMS320C28x CPU and Instruction Set Reference Guide” (SPRU430E), there is no information for a
“MOV SP,…” instruction.  Is this covered by one of  the others?

What I really want to find is something like “MOV [loc16],SP”, so I can copy the stack pointer value at a specified point of code execution.

Regards.

  • Giles Robnson said:
    Looking at “TMS320C28x CPU and Instruction Set Reference Guide” (SPRU430E), there is no information for a
    “MOV SP,…” instruction.  Is this covered by one of  the others?

    its a MOV loc16, #16-bit instruction

    What I really want to find is something like “MOV [loc16],SP”, so I can copy the stack pointer value at a specified point of code execution.

    under register addressing mode loc16 can be SP so any instruction with a MOV <something>, loc16 can be used

    e.g. MOV AL, SP

  • I guess I should have worked that out for myself.

    e.g MOV *(0:0x0010), SP does what I want.

    Thanks