 beg of screen to crsr
@not_cursor_to_end:
  cmp #$01
  bne @not_start_to_cursor
  jsr erase_line_to_cursor    ; del start of ln
  ldx $d6       ; get crsr line
:
  dex           ; previous line
  bmi @end_escape_seq     ; neg line -> end
  txa
  pha           ; save X
  jsr erase_line_by_number      ; erase line
  pla
  tax           ; restore X
  jmp :-
  ; -- 2 -- del screen
@not_start_to_cursor:
  cmp #$02      ; unknown?
  bne @end_escape_seq     ; then ingnore
  ldx #$18      ; star