There is another macro that resets it to bank0 ...
Code:
RST?RP ' Reset to Bank0
The ASM statement uses that macro to set the bank to 0.
So when you enter an ASM block, you always know you're starting off in bank0.
The ENDASM does not reset to bank0, but as long as you use PBP's banking system and don't change it manually, then after you exit the ASM block, PBP knows what bank you changed to, and will be able to continue on.
If you do GOTO's or BRA's in the ASM block, you have to be more careful, because PBP's banking system can't follow the jumps. It's up to you to make sure the banks are correct before jumping.
If the banks are changed manually without PBP's assistance, then you have to reset the bank manually before exiting the ASM block.
Code:
banksel 0
PREVBANK = 0
ENDASM
hth,
Bookmarks