Thank you for posting that code. As a suggestion, the registers are described as being in "Banks." Code is in "Pages." In order to avoid confusion, it might help to change the #Define's to Bank0 and Bank1, respectively:
Since much later chips do not use STATUS for bank selection, it is easy to forget that bits<6:5> of STATUS are RP1 and RP0, respectively. Thus, "bsf STATUS,RP0" is equivalent to "bsf STATUS,5" but is perhaps more common and easier to recognize what it does.
Since much later chips do not use STATUS for bank selection, it is easy to forget that bits<6:5> of STATUS are RP1 and RP0, respectively. Thus, "bsf STATUS,RP0" is equivalent to "bsf STATUS,5" but is perhaps more common and easier to recognize what it does.
Last edited: