some character insertion fixes
This commit is contained in:
1 parent
c68a255383
commit
7fe8a8b244
2 files changed
+13
-9
No files matched your search
@@ -4,29 +4,24 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// YYY does not work properly when insertion no longer possible
|
// YYY moves cursor down the first time no more insertion is possible
|
||||||
// YYY does not work properlyy in second part of logical line
|
// YYY in second part of the logical line moves everything froom the start of the line
|
||||||
|
|
||||||
|
|
||||||
chrout_screen_INS:
|
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
|
jsr screen_check_space_ends_line
|
||||||
beq chrout_screen_ins_possible
|
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
|
bne_far chrout_screen_calc_lptr_done
|
||||||
|
|
||||||
// FALLTROUGH
|
|
||||||
|
|
||||||
chrout_screen_ins_possible:
|
chrout_screen_ins_possible:
|
||||||
|
|
||||||
// Move chars towards end of the line
|
// Move chars towards end of the line
|
||||||
jsr screen_calculate_PNT_USER
|
|
||||||
jsr screen_get_logical_line_end_ptr
|
jsr screen_get_logical_line_end_ptr
|
||||||
!:
|
!:
|
||||||
// Note: While the following routine is obvious to any skilled
|
// Note: While the following routine is obvious to any skilled
|
||||||
@@ -57,4 +52,11 @@ chrout_screen_ins_possible:
|
|||||||
lda #$20
|
lda #$20
|
||||||
sta (PNT), y
|
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
|
jmp chrout_screen_calc_lptr_done
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
screen_check_space_ends_line:
|
screen_check_space_ends_line:
|
||||||
|
|
||||||
jsr screen_get_logical_line_end_ptr
|
jsr screen_get_logical_line_end_ptr
|
||||||
|
|
||||||
lda (PNT), y
|
lda (PNT), y
|
||||||
cmp #$20
|
cmp #$20
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
Reference in new issue
Block a user