 screen line up to crsr
; (Erase Begin of Line)
; destroys all registers
; -------------------------------------
erase_line_to_cursor:
; erase chars
  ldy $d3       ; get crsr col
  lda #$20      ; load space
:  
  sta ($d1),y   ; clear char
  dey
  bpl :-      ; pos>=0 -> next
  sta $ce       ; del char ..
                ; ..under crsr
; set colour                      
  ldy $d3       ; get crsr col
  lda #charmode_vanilla      ; load vanilla
:
  sta ($f3),y   ; clear char
  dey
  bpl