Jump to content
Sign in to follow this  
crash_n_burn

Problem With Goto In Boostc

Recommended Posts

I am unable to get the GOTO instruction to work in BoostC. I always get "label lookup error"

 

It's not recommended to use the GOTO instruction but I use it to get out of a nested loop.

 

I am carefully paying attention to the syntax but the compiler is unable to find the label.

 

...
goto progm;
...
progm:
...

I tried in assembly and it does not work all the time :

asm
{
 start:
 btfsc _i, 4
 goto start
   ...
}

Depending on where the assembly code is in my prog, sometime it's ok, sometime it's not.

Share this post


Link to post
Share on other sites

crash_n_burn,

 

 

void main()
{	
char i;
asm
{
 start:
 btfsc _i, 4
 goto start
  
}

}

 

This code compiles for me no problem using BoostC V1.8.

I don't know what you are doing different ? :blink:

 

Regards

Dave

Share this post


Link to post
Share on other sites

I'm using V1.8 Also. I don't know what is going on with my program... Anyway, I wrote my program a different way to get rid of the GOTO.

 

 

When I have more time, I'll investigate further to find out what is going on.

 

 

Thanks for your reply Dave.

Share this post


Link to post
Share on other sites

Same problem here using BoostC 1.8.

It's a big chunk of code so I will not publish it here.

 

Normally I use C2C but I'll get an error when using

#pragma DATA 0x2100, "string"

 

With BoostC 1.8 #pragma seems to work but now I'll

get an error with using "goto"...

 

Function "disable_interrupt()" is missing too and I don't want to rewrite

all my code.

 

I'm back to C2C :-(

 

I'll try again when a newer version is released.

Share this post


Link to post
Share on other sites

Guys (and girls?),

 

Please send a project demonstrating this problem to support@picant.com so we can get it fixed.

 

 

Regards

Dave

Share this post


Link to post
Share on other sites

Is it possible to send you a mail with an attachement containing the sourcecode? I can't find an option to attache files when using the mailfacilities at this forum...

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...