title: Custom keyboard interrupt handler
body: <p>I'm trying to write a simple program that will replace standard keyboard interrupt with a custom one that will decrement a variable. However, it won't work without a call to the old handler. Here is my interrupt handler:</p>
  
  <pre><code>handler proc
    push ax
    push di
    dec EF
    ;pushf      ;when these to instructions commented keyboard interrupts handling hangs
    ;call [OLD]
    mov al,20h
    out 20h,al
    pop di
    pop ax
    iret
  handler endp
  </code></pre>
  
  <p>What actions I should also execute in my handler to make it works without calling the old handler?</p>