1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

1 byte code size donation for Fabrizio ;)

This commit is contained in:
IrgendwerA8 2018-05-29 01:12:51 +02:00
commit 0f108cb4d8
3 changed files with 9 additions and 8 deletions

View File

@ -60,8 +60,10 @@ L2: jsr KBDREAD ; Read char and return in A
.proc initkbd
ldy #15
ldy #7
@L1: lda fnkeys,y
sta FKEY_SPACE+8,y
lda #$01 ; Lower 8 places are all $01
sta FKEY_SPACE,y
dey
bpl @L1
@ -69,8 +71,7 @@ L2: jsr KBDREAD ; Read char and return in A
.endproc
fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
.byte 133, 137, 134, 138, 135, 139, 136, 140
fnkeys: .byte 133, 137, 134, 138, 135, 139, 136, 140
.code

View File

@ -63,8 +63,10 @@ L2: sta ENABLE_ROM ; Bank in the ROM
.proc initkbd
ldy #15
ldy #7
@L1: lda fnkeys,y
sta FKEY_SPACE+8,y
lda #$01 ; Lower 8 places are all $01
sta FKEY_SPACE,y
dey
bpl @L1
@ -72,8 +74,7 @@ L2: sta ENABLE_ROM ; Bank in the ROM
.endproc
fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
.byte 133, 137, 134, 138, 135, 139, 136, 140
fnkeys: .byte 133, 137, 134, 138, 135, 139, 136, 140
.segment "LOWCODE" ; Accesses the ROM - must go into low mem

View File

@ -40,8 +40,7 @@ L3: jsr KBDREAD ; Read char and return in A
bne seton ; Go set it on
lda CURS_FLAG ; Is the cursor currently off?
bne crs9 ; Jump if yes
inx ; X is now 1
stx CURS_FLAG ; Mark it as off
inc CURS_FLAG ; Mark it as off
lda CURS_STATE ; Cursor currently displayed?
beq crs8 ; Jump if no
ldy CURS_X ; Get the character column