use 'br #IsThisBug' cause this is a function name and cannot be treated as a local label. ~d
On Friday 10 October 2003 13:04, Yu Zhijie wrote: > i'm a beginer of msp430-gcc. i meet one problem for inline asm. > > my os is Win2K Professional, and mspgcc-20030506.exe is download from > http://sourceforge.net/project/showfiles.php?group_id=42303 > > the target MCU is MSP430F149. > > > > the file of main.c > > #include <io.h> > #include <setjmp.h> > > unsigned char c1; > > int main(void) > { > asm volatile("jmp IsThisBug \n\t"::); > > return 0; > } > > void IsThisBug() > { > c1++; > } > > and the code in *.elf.lst is: > > > 00001140 <main>: > > unsigned char c1; > > void main(void) > { > 1140: 31 40 00 0a mov #2560, r1 ;#0x0a00 > asm volatile("jmp IsThisBug \n\t"::); > 1144: 07 3c jmp $+16 ;abs 0x1154 /*** ERROR address for > 0x1154 ?? ****/ } > 1146: 30 40 50 11 br #0x1150 ; > > 0000114a <IsThisBug>: > > void IsThisBug() > { > c1++; > 114a: d2 53 00 02 inc.b &0x0200 ; > } 114e: 30 41 ret > > > But the jmp address at 0x1144 is ERROR! > > It seems like a Byte/Word problem, or the bug of my code??????? > > thanks very much!!! -- /***************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ. (_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314 *****************************************************************/