1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

size optimization

This commit is contained in:
mrdudz 2015-10-12 17:12:44 +02:00
parent bc85d90468
commit cf8b21b27e

View File

@ -16,13 +16,13 @@ soft80_cgetc:
lda KEY_COUNT ; Get number of characters lda KEY_COUNT ; Get number of characters
bne L3 ; Jump if there are already chars waiting bne L3 ; Jump if there are already chars waiting
ldx #1 sec
jsr invertcursor ; set cursor on or off accordingly jsr invertcursor ; set cursor on or off accordingly
L1: lda KEY_COUNT ; wait for key L1: lda KEY_COUNT ; wait for key
beq L1 beq L1
ldx #0 clc
jsr invertcursor ; set cursor on or off accordingly jsr invertcursor ; set cursor on or off accordingly
L3: jsr KBDREAD ; Read char and return in A L3: jsr KBDREAD ; Read char and return in A
@ -59,7 +59,7 @@ invertcursor:
bne @lp1 bne @lp1
pla pla
sta $01 sta $01 ; enable I/O
cli cli
rts rts
@ -68,8 +68,7 @@ invertcursor:
; in soft80_cputc ; in soft80_cputc
setcolor: setcolor:
;ldy #0 ; is 0 ;ldy #0 ; is 0
txa bcs @set
bne @set
; restore old value ; restore old value
lda tmp1 lda tmp1
sta (CRAM_PTR),y ; vram sta (CRAM_PTR),y ; vram