anchor.diff:    (setf top (clamp top 0 (terminal-height term)))
     (setf bottom (clamp bottom 0 (terminal-height term)))
     (when (< top bottom)
  -    (sys.int::%bitset (* (- bottom top) 16) (* (terminal-width term) 8)
  +    (sys.graphics::bitset (* (- bottom top) 16) (* (terminal-width term) 8)
                         #xFF000000 (terminal-framebuffer term)
                         (* top 16) 0)))
   
  
positive.code:                         ((and last-was-cr (eql byte #x00))
                           (setf last-was-cr nil))
                          (t (setf last-was-cr nil)
                             (write-byte byte terminal)))))))
      (end-of-file ()
        (let ((msg "Connection closed by remote host. C-[ to exit."))
          (dotimes (i (length msg))
            (write-byte (char-code (char msg i)) terminal))))))
  
  (defun telnet (&optional (server '(204 236 130 210)) (port 23))
    (sys.int::with-saved-screen (fb)
      (let* ((dims (array-dimensions fb))
             (terminal (make-instance 'xterm-terminal
                                      :framebuffer fb
                                      ;; Avoid the edit & echo behaviour of the framebuffer stream.
                                      :input (make-instance 'sys.int::ps/2-keyboard-stream)
                                      :interrupt-character (name-char "C-["))))
        (sys.int::%bitset (first dims) (second dims) 0 fb 0 0)
        (with-open-stream (connection (sys.net::tcp-stream-connect server port))
          (sys.int::with-process ("TELNET receiver" #'telnet-rx connection terminal)
            (handler-case
                (loop (let ((byte (read-byte terminal)))
                        (when (eql byte +command-iac+)
                          (write-byte +command-iac+ connection))
                        (write-byte byte connection)))
              (terminal-interrupt ())))))))
  
negative.code:     (when (and (<= 0 x (1- (terminal-width term)))
                 (<= 0 y (1- (terminal-height term))))
        (if (eql char #\Space)
            (sys.graphics::bitset 16 8 #xFF000000 (terminal-framebuffer term) (* y 16) (* x 8))
            (sys.int::render-char-at char (terminal-framebuffer term) (* x 8) (* y 16))))
      (incf (x-pos term))))
  
  