some character insertion fixes
This commit is contained in:
1 parent
c68a255383
commit
7fe8a8b244
3 files changed
+45
-41
No files matched your search
@@ -4,29 +4,24 @@
|
||||
//
|
||||
|
||||
|
||||
// YYY does not work properly when insertion no longer possible
|
||||
// YYY does not work properlyy in second part of logical line
|
||||
// YYY moves cursor down the first time no more insertion is possible
|
||||
// YYY in second part of the logical line moves everything froom the start of the line
|
||||
|
||||
|
||||
chrout_screen_INS:
|
||||
|
||||
// First check if last character of the line is space
|
||||
// First check if last character of the logiccall line is space
|
||||
|
||||
jsr screen_check_space_ends_line
|
||||
beq chrout_screen_ins_possible
|
||||
|
||||
// Not space, try to grow logical line and check once again
|
||||
// Not space, we cannot insert anything
|
||||
|
||||
jsr screen_grow_logical_line
|
||||
jsr screen_check_space_ends_line
|
||||
bne_far chrout_screen_calc_lptr_done
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_ins_possible:
|
||||
|
||||
// Move chars towards end of the line
|
||||
jsr screen_calculate_PNT_USER
|
||||
jsr screen_get_logical_line_end_ptr
|
||||
!:
|
||||
// Note: While the following routine is obvious to any skilled
|
||||
@@ -57,4 +52,11 @@ chrout_screen_ins_possible:
|
||||
lda #$20
|
||||
sta (PNT), y
|
||||
|
||||
// If line does not end with space now, grow try to grow the logical line
|
||||
|
||||
jsr screen_check_space_ends_line
|
||||
beq !+
|
||||
|
||||
jsr screen_grow_logical_line
|
||||
!:
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
@@ -1,8 +1,10 @@
|
||||
|
||||
screen_check_space_ends_line:
|
||||
|
||||
jsr screen_get_logical_line_end_ptr
|
||||
lda (PNT), y
|
||||
cmp #$20
|
||||
|
||||
rts
|
||||
|
||||
screen_check_space_ends_line:
|
||||
|
||||
jsr screen_get_logical_line_end_ptr
|
||||
|
||||
lda (PNT), y
|
||||
cmp #$20
|
||||
|
||||
rts
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
|
||||
|
||||
screen_get_logical_line_end_ptr:
|
||||
|
||||
ldy TBLX
|
||||
cpy #24
|
||||
bcs screen_get_logical_line_end_39 // last line of the screen
|
||||
|
||||
lda LDTBL+0, y
|
||||
bpl screen_get_logical_line_end_39 // current line continues previous one
|
||||
|
||||
lda LDTBL+1, y
|
||||
bmi screen_get_logical_line_end_39 // current line is not continued
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_get_logical_line_end_79:
|
||||
|
||||
ldy #79
|
||||
rts
|
||||
|
||||
screen_get_logical_line_end_39:
|
||||
|
||||
ldy #39
|
||||
|
||||
|
||||
screen_get_logical_line_end_ptr:
|
||||
|
||||
ldy TBLX
|
||||
cpy #24
|
||||
bcs screen_get_logical_line_end_39 // last line of the screen
|
||||
|
||||
lda LDTBL+0, y
|
||||
bpl screen_get_logical_line_end_39 // current line continues previous one
|
||||
|
||||
lda LDTBL+1, y
|
||||
bmi screen_get_logical_line_end_39 // current line is not continued
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_get_logical_line_end_79:
|
||||
|
||||
ldy #79
|
||||
rts
|
||||
|
||||
screen_get_logical_line_end_39:
|
||||
|
||||
ldy #39
|
||||
rts
|
||||
Reference in new issue
Block a user