summaryrefslogtreecommitdiff
path: root/programs/sub-suite/subeditor.s
diff options
context:
space:
mode:
Diffstat (limited to 'programs/sub-suite/subeditor.s')
-rw-r--r--programs/sub-suite/subeditor.s26
1 files changed, 20 insertions, 6 deletions
diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s
index 476f1cf..e624990 100644
--- a/programs/sub-suite/subeditor.s
+++ b/programs/sub-suite/subeditor.s
@@ -402,11 +402,12 @@ printc:
@update1:
jsr findend ; Find the end of the line.
sta rege ; Use it for redrawing the line.
- sta scr_row ; Set the row position to to the end of the line.
- jsr findst ; Find the start of the line.
- lda scr_row ; Get the start of the line.
+; sta scr_row ; Set the row position to to the end of the line.
+; jsr findst ; Find the start of the line.
+; lda scr_row ; Get the start of the line.
+ lda scr_trow ; Get the current row position.
@update2:
- sta regf ; Set the starting line, to the start of the line.
+ sta regf ; Set the starting line, to the current row position.
jsr rdrw_ln ; Redraw the line.
lda scr_trow ; Get the real row position back.
sta scr_row ;
@@ -620,7 +621,9 @@ back:
jsr update_pos ; and update it's position.
rts ; We are done.
@update:
- lda scr_row ; Set the line to start redrawing, to the start of the line.
+ lda (ptr3), y ; Are we at the end of the line?
+ beq @shift ; Yes, so skip redrawing.
+ lda scr_trow ; No, so set the line to start redrawing, to the line that the cursor is on.
sta regf ;
inc rege ; Set the redraw flag to true.
bra @shift ; Start shifting the line back.
@@ -939,10 +942,21 @@ update_ptr:
clc ; Clear the carry flag.
lda scr_row ; Add the cursor's line number,
adc scr_str ; with the starting line number to get the absolute line number.
- tay ; Place it in the Y regster for now.
mul #maxcol+1 ; Multiply the line number by the screen's max column count, plus 1.
clc ; Clear the carry flag.
adc scr_col ; Add the cursor's column number to get the screen index.
+; cmp.w #$2000 ; Is the index greater than, or equal to the end of the screen buffer?
+; bcc @end ; No, so we're done.
+;@wrap:
+; and #0 ; Reset the screen's starting line.
+; sta scr_str ;
+; sta regf ; Setup the starting line for rdrw_ln.
+; lda #maxrow ; Reset the screen's ending line.
+; sta scr_end ;
+; sta rege ; Setup the ending line for rdrw_ln.
+; jsr rdrw_ln ; Redraw the entire screen.
+; bra update_ptr ; Get the screen index.
+@end:
rts ; End of update_ptr.