 special?
  beq handle_special_char        
  jsr print_to_screen ; print to screen        
@done:
  rts



do_cr:
  ldx $d6     ; get row
  ldy #$00    ; set col=0
  jsr cursor_plot   ; set crsr
  rts
                     
do_line_feed:
  ldx $d6     ; crsr line
  cpx scroll_region_end     ; end scroll region?
  bne down_one_line    ;  no -> go on
  jsr cursor_off
  jsr scroll_up_scrollregion   ;  yes -> scroll up
  jsr cursor_on
  rts

handle_special_char:
  tya         ; restore o