CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

mic c and ASM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
julien lochen



Joined: 16 May 2008
Posts: 14

View user's profile Send private message

mic c and ASM
PostPosted: Thu Jun 19, 2008 11:00 am     Reply with quote

Hello,

I have an issue when I use a sticker in my ASM routine included in a c file:

////////////////////////////////////
#include <PIC_16F886.h>

#byte PORTC = 0x07
#byte TRISC = 0x87

void main(void)
{

#ASM
bsf PORTC,7
bcf TRISC,7
loop goto loop
#ENDASM
}
////////////////////////////////////

it says:
Error 95 "PIC_16F886.c" Line 38(6,10): Expecting an opcode mnemonic loop
1 Errors, 0 Warnings.

something to do with "loop", shall I declare it at the beginning of my programm ?


thanks, julien lochen
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Jun 19, 2008 11:29 am     Reply with quote

Code:
loop goto loop


What is the first "loop" supposed to be? Is it a label? It is not an opcode mnemonic which is what the compiler is looking for. Maybe you want this?
Code:
loop: goto loop

_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group