small size optimization of screen code
This commit is contained in:
1 parent
793c83be2b
commit
c9ba173195
3 files changed
+28
-34
No files matched your search
@@ -120,14 +120,11 @@ chrout_screen_literal:
|
||||
chrout_screen_calc_lptr_done:
|
||||
|
||||
jsr screen_calculate_PNT_USER
|
||||
jsr screen_calculate_PNTR
|
||||
jsr screen_calculate_LNMX
|
||||
jsr screen_calculate_PNTR_LNMX
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_done:
|
||||
|
||||
// YYY should we update character under cursor here? or in cursor_show_if_enabled?
|
||||
|
||||
jsr cursor_show_if_enabled
|
||||
jmp chrout_done_success
|
||||
@@ -1,30 +0,0 @@
|
||||
|
||||
//
|
||||
// Sets PNTR in a proper range (0-39 or 40-79) depending on the
|
||||
//
|
||||
|
||||
|
||||
screen_calculate_PNTR:
|
||||
|
||||
ldy TBLX
|
||||
lda LDTBL, y
|
||||
php
|
||||
jsr screen_get_clipped_PNTR
|
||||
plp
|
||||
bmi screen_calculate_PNTR_0_39
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_PNTR_40_79:
|
||||
|
||||
tya
|
||||
clc
|
||||
adc #40
|
||||
tay
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_PNTR_0_39:
|
||||
|
||||
sty PNTR
|
||||
rts
|
||||
+27
@@ -1,9 +1,36 @@
|
||||
|
||||
//
|
||||
// Sets PNTR in a proper range (0-39 or 40-79)
|
||||
// Sets LNMX to 39 or 79
|
||||
//
|
||||
|
||||
|
||||
screen_calculate_PNTR_LNMX:
|
||||
|
||||
ldy TBLX
|
||||
lda LDTBL, y
|
||||
php
|
||||
jsr screen_get_clipped_PNTR
|
||||
plp
|
||||
bmi screen_calculate_PNTR_0_39
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_PNTR_40_79:
|
||||
|
||||
tya
|
||||
clc
|
||||
adc #40
|
||||
tay
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_PNTR_0_39:
|
||||
|
||||
sty PNTR
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_LNMX:
|
||||
|
||||
ldy TBLX
|
||||
Reference in new issue
Block a user