inverted result for checkchar, saving some bytes and cycles

This commit is contained in:
mrdudz
2015-10-12 19:03:50 +02:00
parent 4557e8d004
commit bf3ea5328f

View File

@@ -389,7 +389,7 @@ remcolor:
; => only one char in cell used ; => only one char in cell used
jsr soft80_checkchar jsr soft80_checkchar
bcc @sk1 ; space at current position bcs @sk1 ; space at current position
; vram (textcolor) = bgcolor ; vram (textcolor) = bgcolor
lda (CRAM_PTR),y ; vram lda (CRAM_PTR),y ; vram
@@ -447,7 +447,7 @@ soft80_putcolor:
@l2s: @l2s:
; one character in cell is already used ; one character in cell is already used
jsr soft80_checkchar jsr soft80_checkchar
bcs @sk1 ; char at current position => overwrite 1st bcc @sk1 ; char at current position => overwrite 1st
lda soft80_internal_cursorxlsb lda soft80_internal_cursorxlsb
beq @sk3 ; jump if even xpos beq @sk3 ; jump if even xpos
@@ -476,7 +476,8 @@ soft80_putcolor:
; ;
; in: x = $34 ; in: x = $34
; y must be $00 ; y must be $00
; out: CLC: space SEC: character ; out: SEC: space
; CLC: character
; x = $34 ; x = $34
; y = $00 ; y = $00
soft80_checkchar: soft80_checkchar:
@@ -501,11 +502,11 @@ soft80_checkchar:
.endif .endif
.endrepeat .endrepeat
;ldy #$00 ; is 0 ;ldy #$00 ; is 0
clc ;sec ; is set
rts rts
@ischar: @ischar:
ldy #$00 ldy #$00
sec ;clc ; is cleared
rts rts
@l1a: @l1a:
ldy #$07 ldy #$07
@@ -519,6 +520,6 @@ soft80_checkchar:
.endif .endif
.endrepeat .endrepeat
;ldy #$00 ; is 0 ;ldy #$00 ; is 0
clc ;sec ; is set
rts rts
.endif .endif