> -----Original Message----- > From: Alan B. Pearce [SMTP:A.B.Pearce@RL.AC.UK] > Sent: Wednesday, April 17, 2002 8:52 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]:Timer2 IRQ on F628 > > >I found the problem - banking > >"D'oh" just isn't enough. Justifies a "Shazbat" I think > >Olin, in his example, precedes the setting of PIE1 with > >dbankif pie1 > >which allows access to PIE1 in bank1. > > Now you know why Olin's macros are so good. Just put a dbankif in front of > every register reference, and if it is not needed no code is generated. > > Hmm, surely this can't work for goto's and calls can it? The assembler dosen't (AFAIK) follow the flow of the code so it can't know if any particular bit of code has already had the banks bits set before a branch somewhere else in the program, or am I missing something obvious (as usual). Mike -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads