Asm interrupt handlers and register variables ?

General discussion on mikroPascal for dsPIC30/33 and PIC24.
Post Reply
Author
Message
faramir
Posts: 9
Joined: 30 Aug 2007 16:07

Asm interrupt handlers and register variables ?

#1 Post by faramir » 30 Aug 2007 16:17

I have two questions I've been unable to find an answer to in mikroPascal-dspic Manual and version 6.0.0's Help:

1: Is it possible to declare interrupt handlers, written solely in assembly (i.e. without mikroPascal interrupt stub that pushes & pops all the working registers) ? I need an ADC interrupt to execute as often as possible and ~30 cycles spent pushing and popping (unused !) registers is 30 cycles wasted. At 30 MIPS and 1 MSPS in 30F401x that means it is impossible handle/store acquired data within an interrupt handler.

2: Can register variables be declared ? In other words, would declaring a variable with absolute keyword pointing to working register memory space prevent compiler from using that register in generated code ? Alternatively, can compiler be instructed not to touch certain working registers (say W5-W8) ?

Post Reply

Return to “mikroPascal for dsPIC30/33 and PIC24 General”