On 30 Oct 2008, at 19:00 , Joep Suijs wrote:

>
> 2008/10/30, Eur van Andel <[EMAIL PROTECTED]>:
>>
>> On 30 Oct 2008, at 11:04 , Sebastien Lelong wrote:
>>
>>> Do you think replacing asm code by jal code could really be  
>>> problem ?
>>
>> No, but ISRs should be as short an clear as possible. I would have  
>> to check
>> the asm output to see that the JAL code does exactly what I want.  
>> I'm pretty
>> sure the code would be longer as well, which increases the ISR  
>> overhead.
>>
>
> I don't think an ISR should be as short and clear as possible *at all
> cost*. IMHO asm code should only be used as the last resort, like when
> it can't be done in JAL (although I can't think of any situation) or
> for a specific application that's so time-critical that it can not
> work with jal code.
>
> JAL handles interrupts very well and it handles complex isr even much
> better then the microchip c compiler. We should use this feature for a
> number of reasons:
> - We use JAL over assembler for the main functions and the reasons for
> that also apply to an ISR.
> - Writing ISRs in JAL makes it an integral part of the program, so the
> compiler does everything to make it work and optimises it (as far as
> it can).
> - ISR's in JAL are more easy to understand and modify for most users.

You are mostly right. Debugging an ISR is a nightmare, however.

> I do not doubt this will give some discussion. I suggest that, when we
> finished that, we put the outcome in the JSG ;-)

Maybe I will code a JAL-ISR TMR1 RTC sometime.

> - JAL code is converted into code for the PIC at hand, while asm code
> for 16f pic's won't work on any 18f pic, for example.

Why not? There's only the access bank bit. The 16F assembler is just  
a subset of the 18F set?



---
ir EE van Andel [EMAIL PROTECTED]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to