Thanks for the info guys. I will be migrating over to C as soon as I can understand it better. For whatever reason, C seems much more cryptic and less intuitive than assembly. IMO it was easier for me to learn assembly, with no programing experience, than it is for me to learn C with a few months of coding in asm.
This may sound crazy, but once I learn C I might just write a program where you paste in all the registers by bank and then the code and then it spits out the code for you with bank selection.
I imagine the executable prompt as follows:
How many banks does your PIC have?
<user enters number of banks>
Enter the SFRs in bank 0 just as they are refered to in the datasheet.
<user copies and pastes bank 0 FSRs into prompt window>
(Same for banks 1 through n)
Enter the user file names assigned to RAM locations common to all banks.
<user enters names of all user file names defined to global RAM positions>
How many banks are you using "name assigned" RAM that is bank specific?
<user enters answer>
Enter user file names that are specific to bank 0. Enter "none" if there are none, and enter "finished" if there are no more user defined names for bank specific RAM.
<user copies user defined RAM names in bank 0 into prompt window>
(Do above until user enters finished or all banks have been completed)
Copy in your assembly program below and press enter.
<user copies in program hits enter, and program inserts bank selection commands in subroutines where needed>
(The program will start in bank 0, and then look for "MOVLW" and "MOVF". When it seems this, the program will compare the destination file to the bank which is currently selected and insert a BANKSEL directive into the user's code prior to the next command if necessary.
Anyone see a problem with that?