This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Inline Assembler - error C195

Hello,
I can't compile inline assembler code, which includes intruction

MOV [Rw+],[Rw]
Please see modified example from appl. note 172. Compiler returns warning C195: inline-asm: ambigous operand type, 'word' assumed on line labeled lM. I don't know why.
void copy (int near *pTab1, int near *pTab2, int N)
{
  __asm
  {                   ; open inline-assembly block
    mov   r7,pTab2
    mov   r3,N
    cmp   r3,#0
    jmp   cc_sle,stop ;
    shl   r3,#1       ; N * 2
    add   r3,r7       ; R3 := (N*2)+pTab2, end of table + 2
    mov   r4,#0x00    ; clear result

lM: mov   [r7+],[pTab1]
    ADD   pTab1,#2
    cmp   r7,r3       ; end of table ?
    jmp   cc_nz,lM    ; loop if not eot
  }
stop:
  __asm { nop    ; single line assembly }
  __asm { nop    ; another nop          }
}
I can't compile some units from DSP Library produced by Infineon, that's my main problem.
I use C compiler v.5.05.

Thak you for advice
Pavel

Parents
  • Thank you a lot Peter,
    It works now. I nead word move.

    I didn't know that MOVW is defined. Please where can I find it?

    I considered definition from Instruction Set:
    MOV [Rw +],[Rw] Move indirect word memory to indirect memory and
    post-increment destination pointer by 2


    Have a nice day
    Pavel

Reply
  • Thank you a lot Peter,
    It works now. I nead word move.

    I didn't know that MOVW is defined. Please where can I find it?

    I considered definition from Instruction Set:
    MOV [Rw +],[Rw] Move indirect word memory to indirect memory and
    post-increment destination pointer by 2


    Have a nice day
    Pavel

Children