----- Original Message ----- From: Ken Pergola To: Sent: Thursday, February 19, 2004 6:57 PM Subject: Re: [PIC:] banksel vs status reg > Alan B. Pearce wrote: > > > Optimised banking is exactly what Olin's DBANK macros do, generating none, > > one or two bsf/bcf instructions as necessary when handled correctly. The > > banksel macro always generates two instructions, which can add up to a lot > > of extra code if not done carefully. > > Hi Alan, > > Perhaps you misunderstood what I meant by performing "human optimized" > banking. > > Yes, I'm already aware of all that you have mentioned above, and that's > great if a person is using Olin's environment. > > But I mentioned "human optimized" banking in my post which is implying > performing banking manually -- in which the coder is bank optimizing within > the context of the source code to save instructions -- which I don't > recommend as I said in my post, that's all. > > My point was that BANKSEL is much better than "human optimized" banking. > > If someone is using DBANK, then that is just one step better than BANKSEL. > > > Best regards, > > Ken Pergola The XCASM assembler actually does optimised bank management. Unlike BANKSEL it inserts the least number of bank select instructions required and unlike DBANK it tracks bank select through subroutine calls. It does a similar think for code pages. This is the kind of assembler Microchip should have produced years ago. It would have made their PIC architecture seem much more friendly. Regards Sergio Masci http://www.xcprod.com/titan/XCSB - optimising structured PIC BASIC compiler -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu