SUBWF Subtract W from f
Syntaxe : | SUBWF f,d | |
Opération : | (f) - (W) -> (destination) | 0 < f < 127 |
Bits d'état affectés : | C, DC, Z |
Description : |
Soustrait le contenu de W au contenu de f (méthode du complément à 2).
Le résultat est placé dans le registre W si d=0 ou dans le registre f si d=1.
|
Exemple 1 : | SUBWF REG,1 | |
avant l'instruction | REG = 03h W = 02h | |
après l'instruction |
REG = 01h W = 02h
C = 1 ; résultat positif
Z = 0
|
Exemple 2 : | SUBWF REG,1 | |
avant l'instruction | REG = 02h W = 02h | |
après l'instruction |
REG = 00h W = 02h
C = 1
Z = 1 ; résultat nul
|
Exemple 3 : | SUBWF REG,1 | |
avant l'instruction | REG = 01h W = 02h | |
après l'instruction |
REG = FFh W = 02h
C = 1 ; résultat négatif
Z = 0
|
< Précédent | Suivant > |
---|