small code size optimization
This commit is contained in:
1 parent
cded5a0264
commit
018ae9725b
5 files changed
+20
-29
No files matched your search
@@ -272,6 +272,8 @@ m65_chrout_fix_scroll_up_scroll:
|
|||||||
|
|
||||||
phz
|
phz
|
||||||
|
|
||||||
|
; XXX try to shorten code by using m65_screen_put_space
|
||||||
|
|
||||||
jsr m65_helper_scrlpnt_color
|
jsr m65_helper_scrlpnt_color
|
||||||
lda COLOR
|
lda COLOR
|
||||||
and #$0F
|
and #$0F
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ m65_chrout_screen_INS:
|
|||||||
|
|
||||||
jsr m65_chrout_screen_INS_copy
|
jsr m65_chrout_screen_INS_copy
|
||||||
|
|
||||||
; Store space in the current character cell
|
; Store space in the current character cell XXX try to shorten code using m65_screen_put_space
|
||||||
|
|
||||||
lda #$20
|
lda #$20
|
||||||
sta [M65_LPNT_SCR], z
|
sta [M65_LPNT_SCR], z
|
||||||
|
|||||||
@@ -72,20 +72,12 @@ m65_chrout_screen_DEL_1stcol:
|
|||||||
lda M65__TXTCOL
|
lda M65__TXTCOL
|
||||||
beq @3
|
beq @3
|
||||||
|
|
||||||
; Deleta character under cursor
|
; Delete character under cursor
|
||||||
|
|
||||||
phz
|
phz
|
||||||
|
|
||||||
jsr m65_helper_scrlpnt_color
|
|
||||||
ldz M65__TXTCOL
|
ldz M65__TXTCOL
|
||||||
|
jsr m65_screen_put_space
|
||||||
lda COLOR
|
|
||||||
and #$0F
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
|
|
||||||
jsr m65_helper_scrlpnt_to_screen
|
|
||||||
lda #$20
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
|
|
||||||
plz
|
plz
|
||||||
|
|
||||||
|
|||||||
@@ -98,15 +98,7 @@ m65_chrout_esc_P: ; erase everything from start of the line to cursor XXX u
|
|||||||
ldz #$FF
|
ldz #$FF
|
||||||
@1:
|
@1:
|
||||||
inz
|
inz
|
||||||
; XXX common part - deduplicate, find other places
|
jsr m65_screen_put_space
|
||||||
lda #$20
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
jsr m65_helper_scrlpnt_color
|
|
||||||
lda COLOR
|
|
||||||
and #$0F
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
jsr m65_helper_scrlpnt_to_screen
|
|
||||||
; XXX end common part
|
|
||||||
cpz M65__TXTCOL
|
cpz M65__TXTCOL
|
||||||
bne @1
|
bne @1
|
||||||
|
|
||||||
@@ -121,15 +113,7 @@ m65_chrout_esc_Q: ; erase everything from cursor till the end of line XXX u
|
|||||||
taz
|
taz
|
||||||
@1:
|
@1:
|
||||||
dez
|
dez
|
||||||
; XXX common part - deduplicate, find other places
|
jsr m65_screen_put_space
|
||||||
lda #$20
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
jsr m65_helper_scrlpnt_color
|
|
||||||
lda COLOR
|
|
||||||
and #$0F
|
|
||||||
sta [M65_LPNT_SCR], z
|
|
||||||
jsr m65_helper_scrlpnt_to_screen
|
|
||||||
; XXX end common part
|
|
||||||
cpz M65__TXTCOL
|
cpz M65__TXTCOL
|
||||||
bne @1
|
bne @1
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,19 @@ m65_screen_clear_special_modes: ; XXX consider integrating with 'm65_screen_clea
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
m65_screen_put_space:
|
||||||
|
|
||||||
|
; Puts space in current line, position .Z
|
||||||
|
|
||||||
|
lda #$20
|
||||||
|
sta [M65_LPNT_SCR], z
|
||||||
|
jsr m65_helper_scrlpnt_color
|
||||||
|
lda COLOR
|
||||||
|
and #$0F
|
||||||
|
sta [M65_LPNT_SCR], z
|
||||||
|
jmp m65_helper_scrlpnt_to_screen
|
||||||
|
|
||||||
|
|
||||||
m65_screen_upd_txtrow_off:
|
m65_screen_upd_txtrow_off:
|
||||||
|
|
||||||
ldy M65__TXTROW
|
ldy M65__TXTROW
|
||||||
|
|||||||
Reference in new issue
Block a user