Quote Originally Posted by The Altruist
I'm having trouble figuring out how to access the High and Low Bytes of 16-bit Words in Assembler.
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
You can use the CHK?RP macro to locate the bank for any variable.
But if you're accessing arrays, it's probably better to use an FSR/INDF.
<br>