Jump to content

Picky Inline Assembler


Recommended Posts

v6.95, on WinXP, compiling for 18f24k20

 

After a bit of chasing around it seems that the compiler is very picky on the placement of the curly braces when using inline asm - i.e. the curly braces must be on separate lines...

 

code of the form

 

void foo (void)

{

//some C code

asm { tblrd*+ }

//some more C code

}

 

will cause the compiler to throw a 'missing paren' error on the following function.

 

whereas:

 

void foo (void)

{

//some C code

asm

{

tblrd*+

}

//some more C code

}

 

is fine.

 

From memory I think that even

 

void foo (void)

{

//some C code

asm {

tblrd*+

}

//some more C code

}

 

causes problems (but not 100% sure on that)

 

regards

 

Phil.

Link to post
Share on other sites

No problem. However the compiler error message is somewhat cryptic.

 

May I suggest you update the user doc's to make it clear that the only valid syntax is the multi-line one.

 

thanks.

 

Phil.

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...
×
×
  • Create New...