reenabled tab, some work towards char delete
This commit is contained in:
1 parent
c44120ee96
commit
98e7e633e8
6 files changed
+74
-45
No files matched your search
@@ -118,7 +118,7 @@ initmsg_real:
|
|||||||
ldy #>startup_banner
|
ldy #>startup_banner
|
||||||
jsr STROUT
|
jsr STROUT
|
||||||
|
|
||||||
ldx #$04
|
ldx #$05
|
||||||
ldy #$00
|
ldy #$00
|
||||||
jsr plot_set
|
jsr plot_set
|
||||||
|
|
||||||
@@ -126,20 +126,20 @@ initmsg_real:
|
|||||||
ldy #>rom_revision_basic_string
|
ldy #>rom_revision_basic_string
|
||||||
jsr STROUT
|
jsr STROUT
|
||||||
|
|
||||||
ldx #$04
|
ldx #$05
|
||||||
ldy #$12
|
ldy #$12
|
||||||
jsr plot_set
|
jsr plot_set
|
||||||
|
|
||||||
jsr initmsg_bytes_free
|
jsr initmsg_bytes_free
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
#if CONFIG_SHOW_FEATURES
|
||||||
ldx #$05
|
ldx #$08
|
||||||
ldy #$00
|
ldy #$00
|
||||||
jsr plot_set
|
jsr plot_set
|
||||||
jsr print_features
|
jsr print_features
|
||||||
jmp print_return
|
jmp print_return
|
||||||
#else
|
#else
|
||||||
ldx #$05
|
ldx #$08
|
||||||
ldy #$00
|
ldy #$00
|
||||||
jmp plot_set
|
jmp plot_set
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ chrin_repeat:
|
|||||||
|
|
||||||
empty_line:
|
empty_line:
|
||||||
// For an empty line, just return the carriage return
|
// For an empty line, just return the carriage return
|
||||||
// (and don't forget to actually print the carriage return, so that
|
// (and do not forget to actually print the carriage return, so that
|
||||||
// the cursor advances and screen scrolls as required)
|
// the cursor advances and screen scrolls as required)
|
||||||
|
|
||||||
ply_trash_a
|
ply_trash_a
|
||||||
@@ -72,7 +72,7 @@ read_from_keyboard:
|
|||||||
cmp #$0D
|
cmp #$0D
|
||||||
bne not_enter
|
bne not_enter
|
||||||
|
|
||||||
chrin_enter:
|
chrin_enter: // YYY test this!
|
||||||
|
|
||||||
jsr cursor_disable
|
jsr cursor_disable
|
||||||
jsr pop_keyboard_buffer
|
jsr pop_keyboard_buffer
|
||||||
@@ -81,7 +81,7 @@ chrin_enter:
|
|||||||
// It was enter.
|
// It was enter.
|
||||||
// Note that we have a line of input to return, and return the first byte thereof
|
// Note that we have a line of input to return, and return the first byte thereof
|
||||||
// after computing and storing its length.
|
// after computing and storing its length.
|
||||||
// (Compute's Mapping the 64, p96)
|
// (Computes Mapping the 64, p96)
|
||||||
|
|
||||||
// Set pointer to line of input
|
// Set pointer to line of input
|
||||||
lda PNT+0
|
lda PNT+0
|
||||||
@@ -89,14 +89,34 @@ chrin_enter:
|
|||||||
lda PNT+1
|
lda PNT+1
|
||||||
sta LXSP+1
|
sta LXSP+1
|
||||||
|
|
||||||
|
// If the current line is a continuation of the previous one, decrease LXSP by 40
|
||||||
|
ldy TBLX
|
||||||
|
lda LDTBL, y
|
||||||
|
bmi chrin_enter_calc_length // branch if not continuation
|
||||||
|
lda LXSP+0
|
||||||
|
sec
|
||||||
|
sbc #40
|
||||||
|
sta LXSP+0
|
||||||
|
bcs !+
|
||||||
|
dec LXSP+1
|
||||||
|
!:
|
||||||
|
ldy #80
|
||||||
|
bne chrin_enter_loop // branch always
|
||||||
|
|
||||||
|
chrin_enter_calc_length:
|
||||||
|
|
||||||
// Calculate length
|
// Calculate length
|
||||||
jsr screen_get_logical_line_end_ptr
|
jsr screen_get_logical_line_end_ptr
|
||||||
iny
|
iny
|
||||||
!: dey
|
|
||||||
|
chrin_enter_loop:
|
||||||
|
|
||||||
|
// Retrieve bytes
|
||||||
|
dey
|
||||||
bmi empty_line
|
bmi empty_line
|
||||||
lda (PNT),y
|
lda (LXSP),y
|
||||||
cmp #$20
|
cmp #$20
|
||||||
beq !-
|
beq chrin_enter_loop
|
||||||
iny
|
iny
|
||||||
sty INDX
|
sty INDX
|
||||||
lda #$01
|
lda #$01
|
||||||
|
|||||||
@@ -126,5 +126,7 @@ chrout_screen_calc_lptr_done:
|
|||||||
|
|
||||||
chrout_screen_done:
|
chrout_screen_done:
|
||||||
|
|
||||||
|
// YYY should we update character under cursor here? or in cursor_show_if_enabled?
|
||||||
|
|
||||||
jsr cursor_show_if_enabled
|
jsr cursor_show_if_enabled
|
||||||
jmp chrout_done_success
|
jmp chrout_done_success
|
||||||
@@ -11,15 +11,9 @@ chrout_screen_DEL:
|
|||||||
beq !+
|
beq !+
|
||||||
jmp chrout_screen_quote
|
jmp chrout_screen_quote
|
||||||
!:
|
!:
|
||||||
|
// ldx PNTR
|
||||||
|
jsr screen_get_clipped_PNTR
|
||||||
|
cpy #$00
|
||||||
jmp chrout_screen_done
|
|
||||||
|
|
||||||
/* YYY disabled for rework
|
|
||||||
chrout_screen_DEL:
|
|
||||||
|
|
||||||
ldx PNTR
|
|
||||||
bne chrout_screen_del_column_non_0
|
bne chrout_screen_del_column_non_0
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
@@ -27,22 +21,32 @@ chrout_screen_DEL:
|
|||||||
chrout_screen_del_column_0:
|
chrout_screen_del_column_0:
|
||||||
|
|
||||||
ldy TBLX
|
ldy TBLX
|
||||||
beq chrout_screen_del_done // delete from row 0, col 0 does nothing
|
beq chrout_screen_del_done // delete from row 0, col 0 does nothing
|
||||||
|
|
||||||
// Column 0 delete just moves us to the end of the
|
|
||||||
// previous line, without actually deleting anything
|
|
||||||
|
|
||||||
|
// Move cursor to end of previous line
|
||||||
dec TBLX
|
dec TBLX
|
||||||
jsr screen_get_current_line_logical_length
|
lda #39
|
||||||
lda LNMX
|
|
||||||
sta PNTR
|
sta PNTR
|
||||||
|
|
||||||
|
// Update PNT and USER pointers
|
||||||
|
jsr screen_calculate_PNT_USER
|
||||||
|
|
||||||
|
// Put space character at the current cursor position
|
||||||
|
ldy #39
|
||||||
|
lda #$20
|
||||||
|
sta (PNT),y
|
||||||
|
|
||||||
|
// XXX should we clear the color too?
|
||||||
|
|
||||||
|
// Finish with recalculating all the variables
|
||||||
jmp chrout_screen_calc_lptr_done
|
jmp chrout_screen_calc_lptr_done
|
||||||
|
|
||||||
chrout_screen_del_column_non_0:
|
chrout_screen_del_column_non_0:
|
||||||
|
|
||||||
// Copy rest of line down
|
/* YYY disabled for rework
|
||||||
jsr screen_get_current_line_logical_length
|
|
||||||
|
// Copy rest of logical line back
|
||||||
|
jsr screen_get_logical_line_end_ptr
|
||||||
ldy PNTR
|
ldy PNTR
|
||||||
cpy LNMX
|
cpy LNMX
|
||||||
beq !++
|
beq !++
|
||||||
@@ -70,7 +74,8 @@ chrout_screen_del_column_non_0:
|
|||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
chrout_screen_del_done:
|
*/
|
||||||
jmp chrout_screen_done
|
|
||||||
|
|
||||||
*/
|
chrout_screen_del_done:
|
||||||
|
|
||||||
|
jmp chrout_screen_done
|
||||||
@@ -6,33 +6,35 @@
|
|||||||
|
|
||||||
#if CONFIG_EDIT_TABULATORS
|
#if CONFIG_EDIT_TABULATORS
|
||||||
|
|
||||||
chrout_screen_TAB_FW:
|
|
||||||
jmp chrout_screen_done
|
|
||||||
chrout_screen_TAB_BW:
|
|
||||||
jmp chrout_screen_done
|
|
||||||
|
|
||||||
/* YYY disabled for rework
|
|
||||||
chrout_screen_TAB_FW:
|
chrout_screen_TAB_FW:
|
||||||
|
|
||||||
lda PNTR
|
jsr screen_get_clipped_PNTR
|
||||||
|
tya
|
||||||
ora #%00000111
|
ora #%00000111
|
||||||
sta PNTR
|
tay
|
||||||
inc PNTR
|
iny
|
||||||
|
cpy #40
|
||||||
|
bcc !+
|
||||||
|
ldy #39
|
||||||
|
!:
|
||||||
|
sty PNTR
|
||||||
|
|
||||||
jmp chrout_screen_calc_lptr_done
|
jmp chrout_screen_calc_lptr_done
|
||||||
|
|
||||||
|
|
||||||
chrout_screen_TAB_BW:
|
chrout_screen_TAB_BW:
|
||||||
|
|
||||||
lda TBLX
|
jsr screen_get_clipped_PNTR
|
||||||
ora PNTR
|
cpy #$00 // YYY maybe it's worth to put this inside screen_get_clipped_PNTR?
|
||||||
beq !+ // top-left corner, recalculating pointer is not necessary, but this is a very rare case nevertheless
|
beq !+ // column 0, recalculating pointers is not necessary, but this is a rare case nevertheless
|
||||||
|
|
||||||
dec PNTR
|
dey
|
||||||
lda PNTR
|
tya
|
||||||
and #%11111000
|
and #%11111000
|
||||||
sta PNTR
|
sta PNTR
|
||||||
!:
|
!:
|
||||||
jmp chrout_screen_calc_lptr_done */
|
jmp chrout_screen_calc_lptr_done
|
||||||
|
|
||||||
|
|
||||||
#endif // CONFIG_EDIT_TABULATORS
|
#endif // CONFIG_EDIT_TABULATORS
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
// YYY test all the cases
|
|
||||||
|
|
||||||
|
|
||||||
screen_grow_logical_line_screen_up:
|
screen_grow_logical_line_screen_up:
|
||||||
@@ -72,6 +71,7 @@ screen_grow_logical_line:
|
|||||||
screen_grow_logical_line_loop:
|
screen_grow_logical_line_loop:
|
||||||
|
|
||||||
// Scroll down one line each loop iteration
|
// Scroll down one line each loop iteration
|
||||||
|
// YYY add LDTBL scrolling
|
||||||
|
|
||||||
ldy #39
|
ldy #39
|
||||||
!:
|
!:
|
||||||
|
|||||||
Reference in new issue
Block a user