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

asm-> option keyword

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







asm-> option keyword
PostPosted: Fri Feb 23, 2007 3:31 am     Reply with quote

trying to compile this chunk of code under CCS PCH + MPLAB 7.51

#include <18f252.h>
....
...
void main()
{
......
#asm
movlw 0b00110111
option
#endasm
.....

getting error :
Executing: "D:\Prog\PCH\Ccsc.exe" "FREQ.C" +FH +LN -T -A -M -Z +Y=9 +EA
*** Error 95 "D:\work\FREQ\FREQ.C" Line 298(2,8): Expecting an opcode mnemonic option


INSTEAD same code with 16F628 + PCM : no error
What's am doing wrong ?
Thanks folks.
Giorgio
Ttelmah
Guest







PostPosted: Fri Feb 23, 2007 3:44 am     Reply with quote

Look at the list of supported mnemonics in the help file. Look in particular at the differences in the list for the PIC18, versus the 12, and 14bit chips. Note the _lack_ of the 'option' keyword. Look at the data sheet for the 18 chip. Look at the memory organisation. Note the _lack_ of an 'option' register...
Everything that was done with the option register on the older chips, is done with different controls on the 18 chips. Even on the 16 chips, directly accessing 'option' is not needed (the compiler allows you to change all these 'options', with it's own keywords).

Best Wishes
gio42
Guest







asm-> option keyword
PostPosted: Fri Feb 23, 2007 5:19 am     Reply with quote

... Hi Ttelmah , message received loud and clear.
Thanks
Giorgio
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