View previous topic :: View next topic |
Author |
Message |
.C
Joined: 06 May 2004 Posts: 19 Location: Italy
|
Built- in functions and int |
Posted: Sat May 22, 2004 8:52 am |
|
|
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
|
|
Posted: Sat May 22, 2004 2:08 pm |
|
|
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
|
|
Posted: Sat May 22, 2004 2:48 pm |
|
|
Thanks |
|
|
future
Joined: 14 May 2004 Posts: 330
|
|
Posted: Sat May 22, 2004 5:02 pm |
|
|
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
|
|
Posted: Sun May 23, 2004 9:13 am |
|
|
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. |
|
|
|