MOVF

Move f

The contents of the register 'f' are move to a destination dependent on the value of 'd'. If 'd' is 0, the result is placed in W. If 'd' is 1, the result is placed in register 'f'.

[the_ad id="3059"]

Syntax:

[ label ] MOVF f,d

Operation:

(f) → destination

Operands:

  • f is from 0 to 127
  • d is either 0 or 1

Status Affected: Z

Example:

MOVF REG,0

Before instruction:

REG = 0x02
W = 0x0F

After instruction:

REG = 0x02
W = 0x02

[the_ad id="3059"]

Example:

MOVF REG,1

Before instruction:

REG = 0x02
W = 0x0F

After instruction:

REG = 0x02
W = 0x0F