mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-12 02:54:54 +00:00
fixed spurious line wrap (and scroll) when writing to the very last char in bottom right hand corner. this was causing the title screen in 'nano' to get scrolled off the top of the screen
git-svn-id: http://svn.code.sf.net/p/netboot65/code@228 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
cf84a7d4f5
commit
a16f32597d
@ -1103,7 +1103,6 @@ print_to_screen:
|
|||||||
; chr in A
|
; chr in A
|
||||||
; X and Y unaffected
|
; X and Y unaffected
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
;plot_char = $e716
|
|
||||||
|
|
||||||
plot_char:
|
plot_char:
|
||||||
sta temp_ptr_x ; save char
|
sta temp_ptr_x ; save char
|
||||||
@ -1159,13 +1158,34 @@ plot_char:
|
|||||||
; --- put char to screen ---
|
; --- put char to screen ---
|
||||||
@put_char:
|
@put_char:
|
||||||
ldy $d3 ; get crsr col
|
ldy $d3 ; get crsr col
|
||||||
|
cpy #$28 ;col = 40
|
||||||
|
bcc @no_line_wrap
|
||||||
|
;the only way we end up trying to write to column 40 should
|
||||||
|
;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
|
sta ($d1),y ; char to screen
|
||||||
lda $0286 ; get colour
|
lda $0286 ; get colour
|
||||||
sta ($f3),y ; set colour
|
sta ($f3),y ; set colour
|
||||||
|
|
||||||
; --- move on crsr ---
|
; --- move on crsr ---
|
||||||
|
|
||||||
|
ldx $d6 ; get crsr row
|
||||||
|
cpx scroll_region_end ; end of scroll reg?
|
||||||
|
beq @dont_scroll_yet ; we don't want to trigger a scroll of the whole screen unless
|
||||||
|
; we are actually writing a char. we shouldn't scroll just when
|
||||||
|
; writing to the bottom right hand screen (else e.g. the title bar
|
||||||
|
; in 'nano' gets pushed off the top of the screen.
|
||||||
|
;
|
||||||
cpy #$27 ; col = 39?
|
cpy #$27 ; col = 39?
|
||||||
beq move_to_next_line ; yes -> new line
|
beq move_to_next_line ; yes -> new line
|
||||||
|
@dont_scroll_yet:
|
||||||
iny ; move on
|
iny ; move on
|
||||||
sty $d3
|
sty $d3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user