C64 soft80 conio: shave off a few bytes and cycles
This commit is contained in:
parent
5df2de0629
commit
294b5d1cf1
1 changed files with 13 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue