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.

TMS320F280049C: what's the difference between @ACC and ACC

Part Number: TMS320F280049C

Hello, TI Experts

   I was confused with @ACC and ACC.

   for example:   MOVL XAR1,@ACC                            

                          MOVL XAR1,ACC 

are these two sentences same?  even ADDL ACC,@ACC ; ACC = ACC + ACC, how to use directive @ ?

another question, as below:

MOV AL,*+XAR4[#6] ; AL = InFilter
MOV AH,*+XAR4[#7] ; AH = InFilter2
SETC AMODE
MOVL *+XAR6[AR1%++],ACC    ; Store new inputs

for the highlighted sentence,

Normally it should be associated with RPT #N,

but there is not "RPT" here, so what's the means here?

thanks!

BR

jjl3

  • jjl3 said:

       for example:   MOVL XAR1,@ACC                            

                              MOVL XAR1,ACC 

    Please refer to http://www.ti.com/lit/spru430

    In the addressing modes section, for 32-bit Register Addressing Modes -  there is this note:

    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.

    For this specific example, this means:

    MOVL XAR1, @ACC:

    • Corresponds to the instruction MOVL XARn, loc32 = Store loc32 in the auxiliary register n   
    • The @ indicates that the 2nd operand is not tied to a specific register
    • In this case loc32 operand could be registers other than ACC. 
    • The opcode of this instruction includes a field for which axillary register is used (XARn) and which 32-bit location is used (loc32). 
    • It does not include the option for a condition to be specified.

    MOVL XAR1, ACC

    • Corresponds to the instruction MOVL loc32, ACC, CND = Conditional store of the ACC
    • In this case ACC is fixed - it cannot be any other register 
    • This form allows for a condition (CND) to be used.  The opcode includes a field for this condition. 

    If no condition is required then the first form is better because it is a 16-bit opcode vs a 32-bit opcode for the conditional move. 

    jjl3 said:

    MOV AL,*+XAR4[#6] ; AL = InFilter
    MOV AH,*+XAR4[#7] ; AH = InFilter2
    SETC AMODE
    MOVL *+XAR6[AR1%++],ACC    ; Store new inputs

    for the highlighted sentence,

    Normally it should be associated with RPT #N,

    but there is not "RPT" here, so what's the means here?

    If there is no RPT instruction, then the instruction is only executed once.  The circular addressing mode is described in  http://www.ti.com/lit/spru430 section 5.6.3 - in this case AMODE == 1. 

    Regards

    Lori