PIC18 cheatsheet

MOVFF

Detailed reference for the MOVFF instruction in PIC18 ISA.

Description

Move the contents of the source file register fs to the destination file register fd. The instruction performs an 8‑bit copy from fs to fd; no additional modifiers such as d or a exist. The address supplied for each operand determines the bank automatically, so the programmer may specify an absolute file address that includes the bank bits.

Examples

; Move from access bank to access bank
MOVFF 0x20, 0x21 ; 0x21 = 0x20
; Move from bank‑2 address to access bank
MOVFF 0x92, 0x15 ; 0x15 = 0x92
; Move from access bank to bank‑1 address
MOVFF 0x1F, 0x91 ; 0x91 = 0x1F
; Move between two banked addresses (bank 2 → bank 3)
MOVFF 0x92, 0x13B ; 0x13B = 0x92