In keil arm 2.11 while(1) { __asm { START: MOV R0,#0 MOV R1,#10 LOOP: BL ADD_SUB B LOOP ADD_SUB: ADD r0,r0,r1 //ADDS r0,r0,r1 <---error?? MOV PC,LR } } FIBO.C(76): error C197: inline-asm: undefined identifier
Looks like you are working in Thumb mode, where there is not 'ADDS' instruction. See: http://www.keil.com/support/docs/2991.htm Reinhard
I found that if use adds in __asm{},there will be a message -- error C197: inline-asm: undefined identifier!! i use keil arm 2.11
also EQU ! I must use #define NUMBER_COUNT 0x40003000 but can't use __asm(NUMBER_COUNT EQU 0x40003000 )
EQU is an assembler control statement, but not an assembly instruction. You can only use assembly instructions with the in-line assembler!