uld
              ;be if we skipped the normal line wrap after writing to col 39
              ;because we are at the end of the scroll region
              ;that means we should do a scroll up and then write this char at col 0
  pha
  jsr scroll_up_scrollregion
  pla
  ldy #$00    ; begin of line
  sty $d3
@no_line_wrap:  
  sta ($d1),y ; char to screen
  lda $0286   ; get colour
  sta ($f3),y ; set colour
  
; --- move on crsr ---
  
  ldx $d6     ; get crsr row
  cpx scroll_region_end   