]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #666 from IrgendwerA8/1_byte_donation_for_fabrizio
authorOliver Schmidt <ol.sc@web.de>
Sun, 27 May 2018 10:17:52 +0000 (12:17 +0200)
committerGitHub <noreply@github.com>
Sun, 27 May 2018 10:17:52 +0000 (12:17 +0200)
1 byte donation for Fabrizio ;)

libsrc/c16/cgetc.s
libsrc/plus4/cgetc.s
libsrc/vic20/cgetc.s

index 3ee31a757faf653086fe4ab28de0a412392dfaae..a61373ac709b8997f85033c9b27eba313bcee2df 100644 (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
index 784bac2674b030f7d9b87ae9e7c26ffd875190f5..fcbc66064542557b33d72b94659ba13553385745 100644 (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
index 4d3a30ea2ad05359f2ceb1504bcfbc2c235780a1..d5af9a9f602637bea22cb98993dab47f64f1e743 100644 (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
-        lda     #1
-        sta     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