XOR

 

XOR        fr,#literal        XOR literal into fr


Words:        2        Cycles:        2                Affects:        Z

 

Operation:        Literal is XOR’d into fr via W. Z will be set to 1 if the result was 0, otherwise Z will be cleared to 0.

 

Coding:        MOVLW                literal

       XORWF                fr,1

 

 

 

XOR        fr1,fr2        XOR fr2 into fr1


Words:        2        Cycles:        2                Affects:        Z

 

Operation:        Fr2 is XOR’d into fr1 via W. Z will be set to 1 if the result was 0, otherwise Z will be cleared to 0.

 

Coding:        MOVF                fr2,0

       XORWF                fr1,1

 

 

XOR        fr,W                XOR W into fr


Words:        1        Cycles:        1                Affects:        Z

 

Operation:        W is XOR’d into fr. Z will be set to 1 if the result was 0, otherwise Z will be cleared to 0.

 

Coding:        XORWF                fr,1

 

 

XOR        W,#literal        XOR literal into W


Words:        1        Cycles:        1                Affects:        Z

 

Operation:        Literal is XOR’d into W. Z will be set if the result was 0, otherwise Z will be cleared.

 

Coding:        XORLW                literal

 

 

XOR        W,fr                XOR fr into W


Words:        1        Cycles:        1                Affects:        Z

 

Operation:        Fr is XOR’d into W. Z will be set to 1 if the result was 0, otherwise Z will be cleared to 0.

 

Coding:        XORWF                fr,0