mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-19 15:30:08 +00:00
bubble: more size optimization
This commit is contained in:
parent
a021e824b3
commit
8313ea50c6
@ -39,7 +39,7 @@ bubble.o: bubble.s hgr_clear_part.s sin_unrolled.s
|
||||
BUBBLE_TINY: bubble_tiny.o
|
||||
ld65 -o BUBBLE_TINY bubble_tiny.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
|
||||
|
||||
bubble_tiny.o: bubble_tiny.s hgr_clear_part.s sin_unrolled.s hgr_clear_codegen.s
|
||||
bubble_tiny.o: bubble_tiny.s hgr_clear_codegen.s
|
||||
ca65 -o bubble_tiny.o bubble_tiny.s -l bubble_tiny.lst
|
||||
|
||||
###
|
||||
|
@ -16,6 +16,7 @@
|
||||
; 2326 bytes -- alignment turned off
|
||||
; 2311 bytes -- optimize mod table generation
|
||||
; 1447 bytes -- first attempt at hgr_clear codegen
|
||||
; 1443 bytes -- tail call optimization
|
||||
|
||||
; soft-switches
|
||||
|
||||
@ -290,7 +291,6 @@ hposn_low = $6b00
|
||||
|
||||
hgr_make_tables:
|
||||
|
||||
|
||||
;=====================
|
||||
; make /7 %7 tables
|
||||
;=====================
|
||||
@ -300,10 +300,9 @@ hgr_make_7_tables:
|
||||
lda #0
|
||||
tax
|
||||
tay
|
||||
|
||||
div7_loop:
|
||||
sta div7_table,Y
|
||||
mod_smc:
|
||||
mod7_smc:
|
||||
stx mod7_table
|
||||
|
||||
inx
|
||||
@ -315,25 +314,11 @@ mod_smc:
|
||||
ldx #0
|
||||
|
||||
div7_not7:
|
||||
inc mod_smc+1 ; assume on page boundary
|
||||
inc mod7_smc+1 ; assume on page boundary
|
||||
iny
|
||||
bne div7_loop
|
||||
|
||||
|
||||
; ldy #0
|
||||
; lda #0
|
||||
;mod7_loop:
|
||||
; sta mod7_table,Y
|
||||
; clc
|
||||
; adc #1
|
||||
; cmp #7
|
||||
; bne mod7_not7
|
||||
; lda #0
|
||||
;mod7_not7:
|
||||
; iny
|
||||
; bne mod7_loop
|
||||
|
||||
|
||||
; Hposn table
|
||||
|
||||
; hposn_low, hposn_high will each be filled with $C0 bytes
|
||||
|
@ -6,7 +6,7 @@ hgr_clear_codegen:
|
||||
;========================
|
||||
; set up output pointers
|
||||
|
||||
lda #<(hgr_page1_clearscreen)
|
||||
lda #<(hgr_page1_clearscreen) ; assume both start page boundary
|
||||
sta OUTL
|
||||
sta INL
|
||||
|
||||
@ -29,7 +29,7 @@ hgr_clear_codegen_loop:
|
||||
lda #$99 ; STA
|
||||
jsr write_both
|
||||
|
||||
lda hposn_low,X
|
||||
lda hposn_low,X ; low is same both
|
||||
jsr write_both
|
||||
|
||||
lda hposn_high,X
|
||||
@ -77,9 +77,11 @@ hgr_clear_codegen_loop:
|
||||
|
||||
|
||||
lda #$60 ; RTS
|
||||
jsr write_both
|
||||
; jsr write_both
|
||||
|
||||
rts ; tail call
|
||||
; rts ; tail call
|
||||
|
||||
; fallthrough
|
||||
|
||||
|
||||
;=============================
|
||||
|
Loading…
x
Reference in New Issue
Block a user