MikroElektronika PIC Microcontrollers PIC16 Specifikace Strana 164

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 266
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 163
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
Syntax: [label] COMF f, d
Description: The content of register f is complemented (logic zeros (0) are replaced by ones
(1) and vice versa). If d = w or d = 0 the result is stored in W. If d = f or d = 1 the result is
stored in register f.
Operation: (f) -> d
Operand: 0 f 127, d[0,1]
Status affected: Z
Number of cycles: 1
EXAMPLE 1:
....
[label] COMF REG,w
Before instruction execution: REG = 0x13 ; 0001 0011 (0x13)
; complementing
------------------
After instruction: REG = 0x13 ; 1110 1100 (0xEC)
W = 0xEC
EXAMPLE 2:
....
[label] COMF INDF, f
Before instruction execution: FSR = 0xC2
Register at address (FSR)contains the value
0xAA
After instruction: FSR = 0xC2
Register at address (FSR)contains the value
0x55
DECF - Decrement f
http://www.mikroe.com/en/books/picmcubook/ch9/ (15 of 35)5/3/2009 11:35:12 AM
Zobrazit stránku 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 265 266

Komentáře k této Příručce

Žádné komentáře