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