NO THERE ISNT ANY EQUIVALENT FUNCTION.Code:Is there a "banksel" function equivalent in PM assembler?
I KNOW THAT , PIC BASIC PRO MAKES THE BANKSEL FUNCTION ITSELF.
NO THERE ISNT ANY EQUIVALENT FUNCTION.Code:Is there a "banksel" function equivalent in PM assembler?
I KNOW THAT , PIC BASIC PRO MAKES THE BANKSEL FUNCTION ITSELF.
I'm trying to use inline Assembler, but I use multiple arrays which means I need to address multiple banks. How can I tell which bank a given array is stored in?
Also, I'm not certain how you mean that banksel is produced by PM itself. I'm using 2.5, and it's choking on errors - all related to my attempts to use banksel.
This may all be simplified if I just specify which bank I want each variable in.
Originally Posted by The Altruist
You can use the CHK?RP macro to locate the bank for any variable.Code:MyWord VAR WORD BANK0 ASM movf _MyWord,w ; this gets the LowByte movwf PORTB movf _MyWord + 1,w ; this gets the HighByte movwf PORTC ENDASM
But if you're accessing arrays, it's probably better to use an FSR/INDF.
<br>
DT
Bookmarks