Hello, I can't compile inline assembler code, which includes intruction
MOV [Rw+],[Rw]
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 } }
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
Pavel, here is the link: http://www.keil.com/support/man/docs/a166/a166_xa.htm The table near the end of the page contains that information. Peter