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 CCS Technical Support

Built- in functions and int

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



Joined: 06 May 2004
Posts: 19
Location: Italy

View user's profile Send private message

Built- in functions and int
PostPosted: Sat May 22, 2004 8:52 am     Reply with quote

Do you know if interrupt handler break any built functions?
Thank
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat May 22, 2004 2:08 pm     Reply with quote

Quote:

Do you know if interrupt handler break any built functions?


Not exactly "break", but interrupt it. (If such interrupt was enabled)
The interrupt handler is the code related to the corresponding hardware
vector interrupt. By it�s nature, it�s "triggered by the hardware" so it has
higher priority than the rest of the code, like a built in function.

HTH,

Humberto
.C



Joined: 06 May 2004
Posts: 19
Location: Italy

View user's profile Send private message

PostPosted: Sat May 22, 2004 2:48 pm     Reply with quote

Thanks
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Sat May 22, 2004 5:02 pm     Reply with quote

Does it have problems if the interrupt handler modifies data that were used in the code that was running? or it has a protection to this not happen?
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Sun May 23, 2004 9:13 am     Reply with quote

future wrote:
Does it have problems if the interrupt handler modifies data that were used in the code that was running? or it has a protection to this not happen?


This can be a problem. For example when incrementing a 16 bit number and the lower byte rolls over the upper byte should be incremented. If in interupt occurs between these two operations you could have the sort of problem you discribe. The compiler can not protect aginst this. This requires carefull coding.
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