        ; next line
  ldy $d3     ; get col
  jsr cursor_plot   ; set crsr
  rts        


; esc mode
; data in Y
; escape_mode <> $00 in A
handle_escape_char:
  tax         ; save escape_mode
  and #$0f    ; escape_mode = $0f?
  bne @not_discard_mode

; --- discard mode --- escape_mode = $f0
;discard char
  lda #$00    ; reset escape_mode
  sta escape_mode
  rts

@not_discard_mode:
  txa         ; restore escape_mode
  and #$f0    ; escape_mode = $ff?
  beq @short_escape_mode    ; no