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

CCS plus assembly
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sun Mar 19, 2017 7:54 am     Reply with quote

However the use of #byte, didn't need getenv. Getenv, is just a nice way of being able to get register locations by name.
So you could have just done:
Code:


#byte CCP2CON = 0xFBA

//then

     CCP2CON=CCP_CAPTURE_FE;
//will set falling edge

     CCP2CON=CCP_CAPTURE_RE;
//will set rising edge


Key is that is is honestly very rare indeed now that you need assembler. A few things, mainly where a compiler function has a problem, but putting a value just into an SFR, is one that doesn't...

Can understand though that if you have come 'from' an assembler background it does seem more natural. I used to use bits of assembler in CCS quite a lot. However much less now. Smile
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 19, 2017 4:28 pm     Reply with quote

I am collecting yours (Ttelmah) and other specialists advice's for future usage and learning C Smile
Some implemented already

Best wishes
Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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