16F Bankselect

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi guys,
Is there an easy way to keep track of page boundaries when handling Call or Goto statements which cross the bank/page boundaries?
 
Yes, use C. On a more serious note, not really. I tend to group routines and place them in an upper bank and add the bank number to the end of the name. If MPASM was a little better, like being 3 pass rather than two, you could write a macro to take care of it. Unfortunately, it's a very basic assembler and the macro language leaves much to be desired. One way to automate it would be to always insert the bank switch instructions but that makes each call 2 or 3 instructions.

Mike.
 
A little digging has revealed to me that the midrange 16F,12F series chips have a full 11 bit addressing for Call/Goto statements.
Doesn't this mean that the 2k code Address space does not require bankswitching?
 
A little digging has revealed to me that the midrange 16F,12F series chips have a full 11 bit addressing for Call/Goto statements.
Doesn't this mean that the 2k code Address space does not require bankswitching?

Yes, no bank switching required for 2K.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…