Robert Rolf wrote 2013-10-03 03:15: > One oversight many programmers make is to have a call to some > close-up/finish routine, immediately followed by a return to a higher > level. Just GOTO that call and let IT do the return to save on the local > return word. > > There may even be occasions where you can rearrange the code so that > the 'goto' becomes a 'fall through' so no branch required to get into > the final function. > > I saved 10's of words by carefully rearranging my hex/decimal output > routines so that I could use a lot of 'fall through' to complete > functions. > > If you can group your subroutines into one bank, and KNOW that they > will always be called from within that bank, you can eliminate a lot of > bank switching. > If you can group your subroutines into one page, and KNOW that they will always be called from within that page, you can eliminate a lot of page switching. Not? Jan-Erik. > > I too would love to find a tool to do call graphing and stack depth > tracking. > > When you're counting bytes, every byte counts. > > Robert > > > > > On Wed, Oct 2, 2013 at 4:53 AM, Byron Jeff > wrote: > >> On Tue, Oct 01, 2013 at 04:30:56PM +0300, a.glowing.pear@gmail.com >> wrote: >>>> Note that the newer PIC16F1xxx ("Enhanced Midrange") series has a >>>> faster bank switching then the older PIC16. One single instruktion >>>> instead of 2 (on the old 4 bank models). >>> True, the Enhanced Midrange PICs are really flexible in their >>> bankswitching, but it sill has to be done. I've always found it a >>> bit frustrating that SFR for a particular module do not fall in the >>> same bank. For example, if reading LATx and regular switching of >>> it's direction has to be done, you do need to switch banks. >> >> True. My normal mode of operation is to default to Bank 0 and only >> switch when the targer is in another bank. If I need extended access >> between two banks, instead of switching back and forth, I use one of >> the two FSR/INDF pairs in the enhanced architecture to point to the >> second bank. >> >> BAJ -- Byron A. Jeff Chair: Department of Computer Science and >> Information Technology College of Information and Mathematical >> Sciences Clayton State University http://faculty.clayton.edu/bjeff -- >> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .