Samsung 8-Bit Manuale Utente Pagina 333

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 462
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 332
S3C9228/P9228 SAM88RCRI INSTRUCTION SET
6-17
COM Complement
COM dst
Operation: dst ¨ NOT dst
The contents of the destination location are complemented (one's complement); all "1s" are
changed to "0s", and vice-versa.
Flags: C: Unaffected.
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result bit 7 is set; cleared otherwise.
V: Always reset to "0".
D: Unaffected.
H: Unaffected.
Format:
Bytes Cycles Opcode
(Hex)
Addr Mode
dst
opc dst 2 4 60 R
4 61 IR
Examples: Given: R1 = 07H and register 07H = 0F1H:
COM R1 R1 = 0F8H
COM @R1 R1 = 07H, register 07H = 0EH
In the first example, destination working register R1 contains the value 07H (00000111B). The
statement "COM R1" complements all the bits in R1: all logic ones are changed to logic zeros,
and vice-versa, leaving the value 0F8H (11111000B).
In the second example, Indirect Register (IR) addressing mode is used to complement the value
of destination register 07H (11110001B), leaving the new value 0EH (00001110B).
Vedere la pagina 332
1 2 ... 328 329 330 331 332 333 334 335 336 337 338 ... 461 462

Commenti su questo manuale

Nessun commento