title: Z80 DAA instruction
body: <p>Apologies for this seemingly minor question, but I can't seem to find the answer anywhere - I'm just coming up to implementing the DAA instruction in my Z80 emulator, and I noticed in the Zilog manual that it is for the purposes of adjusting the accumulator for binary coded decimal arithmetic. It says the instruction is intended to be run right after an addition or subtraction instruction.</p>
  
  <p>My questions are:</p>
  
  <ul>
  <li>what happens if it is run after another instruction?</li>
  <li>how does it know what instruction preceeded it? </li>
  <li>I realise there is the N flag - but this surely wouldnt definitively indicate that the previous instruction was an addition or subtraction instruction? </li>
  <li>Does it just modify the accumulator anyway, based on the conditions set out in the DAA table, regardless of the previous instruction?</li>
  </ul>