1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

C64 soft80 conio: shave off a few bytes and cycles

This commit is contained in:
compyx 2020-07-15 21:39:29 +02:00 committed by greg-king5
parent 5df2de0629
commit 294b5d1cf1

View File

@ -46,8 +46,18 @@ invertcursor:
lda #$34
sta $01
jsr setcolor
ldy #0
bcs @set
; restore old value
lda tmp1
bcc @lp0
@set:
; save old value
lda (CRAM_PTR),y ; vram
sta tmp1
lda soft80_internal_cellcolor
@lp0:
sta (CRAM_PTR),y ; vram
ldx soft80_internal_cursorxlsb
ldy #7
@lp1:
@ -65,20 +75,7 @@ invertcursor:
; do not use soft80_putcolor here to make sure the cursor is always
; shown using the current textcolor without disturbing the "color voodoo"
; in soft80_cputc
setcolor:
ldy #0
bcs @set
; restore old value
lda tmp1
sta (CRAM_PTR),y ; vram
rts
@set:
; save old value
lda (CRAM_PTR),y ; vram
sta tmp1
lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
rts
.rodata
nibble: .byte $f0, $0f