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.

C2000 Assembly

In following instruction, why @ is added before XAR6, based on way instruction executes, it is ACC value getting copied in XAR6, there is no indirect addressing involved here?

MOVL         @XAR6, ACC

  • Hi,

    This is not indirect addressing, simply XAR6 = ACC.

    SPRU430F, page 100:

    Note: When writing assembly code, the “@” symbol in front of the register is optional. For example:

    “MOVL ACC,@P” or “MOVL ACC,P”. The disassembler will use the @ to indicate operands that are

    “loc16” or “loc32”. For example, MOVL ACC, @P is the MOVL ACC, loc32 instruction and MOVL @ACC,

    P is the MOVL loc32, P instruction.

     

    Janos

  • Thanks Janos,
    I did not get the difference in MOVL ACC,loc32 and MOVL loc32,P in your explanation., Are you saying that @is used to define source and destination?
  • No, it means, that for copying ACC to XAR6 you can use two different opcodes that will result in the same operation. By placing the @ in front of the destination register name the disassembler tells you that the compiler used the MOV loc32, P instruction. But it does not make any difference considering the result.