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 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
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
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
|
|
||||||
cmp #$20
|
lda (PNT), y
|
||||||
|
cmp #$20
|
||||||
rts
|
|
||||||
|
rts
|
||||||
|
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
screen_get_logical_line_end_ptr:
|
screen_get_logical_line_end_ptr:
|
||||||
|
|
||||||
ldy TBLX
|
ldy TBLX
|
||||||
cpy #24
|
cpy #24
|
||||||
bcs screen_get_logical_line_end_39 // last line of the screen
|
bcs screen_get_logical_line_end_39 // last line of the screen
|
||||||
|
|
||||||
lda LDTBL+0, y
|
lda LDTBL+0, y
|
||||||
bpl screen_get_logical_line_end_39 // current line continues previous one
|
bpl screen_get_logical_line_end_39 // current line continues previous one
|
||||||
|
|
||||||
lda LDTBL+1, y
|
lda LDTBL+1, y
|
||||||
bmi screen_get_logical_line_end_39 // current line is not continued
|
bmi screen_get_logical_line_end_39 // current line is not continued
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
screen_get_logical_line_end_79:
|
screen_get_logical_line_end_79:
|
||||||
|
|
||||||
ldy #79
|
ldy #79
|
||||||
rts
|
rts
|
||||||
|
|
||||||
screen_get_logical_line_end_39:
|
screen_get_logical_line_end_39:
|
||||||
|
|
||||||
ldy #39
|
ldy #39
|
||||||
rts
|
rts
|
||||||
Reference in new issue
Block a user