anchor.diff:           (warn "PS/2 send command #x~2,'0X failed, too many resends." byte)
            (return (values nil :resend-limit-exceeded)))
          (ps/2-write port byte)
  -       (let ((reply (ps/2-read port t)))
  +       (let ((reply (ps/2-read port)))
            (case reply
              (#.+ps/2-ack+ (return t))
              (#.+ps/2-resend+)
  
positive.code:   (ps/2-read-fifo (ecase port
                      (:key *ps/2-key-fifo*)
                      (:aux *ps/2-aux-fifo*))
                    (if (eql timeout t) 10000 timeout)))
  
  (defun ps/2-flush-input (port)
    (ecase port
  
negative.code:   (ps/2-flush-input port)
    ;; Expecting ACK followed by Self-Test-Passed.
    (unless (ps/2-send-command port +ps/2-reset+)
      (warn "PS/2 keyboard reset failed.")
      (return-from init-keyboard))
    (unless (eql (ps/2-read port) +ps/2-self-test-passed+)
      (warn "PS/2 keyboard reset failed.")
      (return-from init-keyboard))
    (format t "Detected ~S on PS/2 ~S port.~%" (ps/2-identify port) port)
    ;; Switch to scancode set 1.
    (unless (ps/2-send-command port #xF0)
      (warn "PS/2 keyboard scancode change failed (1).")
      (return-from init-keyboard))
    (unless (ps/2-send-command port 1)
      (warn "PS/2 keyboard scancode change failed (2).")
      (return-from init-keyboard))
    (unless (ps/2-send-command port #xF4)
      (warn "PS/2 keyboard start reporting failed.")
      (return-from init-keyboard)))
  
  (defun ps/2-mouse-command (port command)
  