What does status affected mean?

Discussion in 'Embedded Systems and Microcontrollers' started by Dawud Beale, Apr 15, 2013.

  1. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    http://www.mikroe.com/chapters/view/10/chapter-9-instruction-set/

    XORWF Exclusive OR W with f​
    Syntax: [ ​
    label ] XORWF f,d
    Operands: 0
    f 127
    d
    [0,1]
    Operation: (W) .XOR. (f)
    destination)
    Status Affected: Z
    Description: Exclusive OR the contents of the W
    register with register ‘f’. If ‘d’ is ‘
    0’, the
    result is stored in the W register. If ‘d’

    is ‘
    1’, the result is


    What does status affected, z, mean?
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It means that the zero flag in the status register will be affected by using this operation... if the result of the operation its zero, the status flag is set.
     
  3. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    It also means that the other bits in STATUS (C and DC) are not affected which sometimes comes in handy in writing shorter code. You can do an instruction which affects C, then XOR, then test the C bit which is still valid.
     
Loading...