PDA

View Full Version : Asm INTHANDLER and $70-$7F



BigWumpus
- 7th January 2005, 22:55
Hello,

why not using the dataarea from $70 to $7F in order to save the registers, because they are mirrored to all banks ?

16F872

Darrel Taylor
- 8th January 2005, 01:37
Yes,

$70-$7F is the perfect place to save the W reg on entry to an interrupt routine. By placing wsave at location $70, you won't have to also create wsave1, wsave2, wsave3.

Just keep in mind that not all PIC's with mutiple RAM banks have this same common area. So if you change to a different chip later on, you'll also need to change the wsave locations.

Best regards,
   Darrel