]> git.sur5r.net Git - cc65/blobdiff - libsrc/c16/cgetc.s
Added SER_ prefix. Whitespace cleanup
[cc65] / libsrc / c16 / cgetc.s
index 8bcb721002d32b25fd16879b910b83a0c51a7ea4..52d985caffb9df4860c67951b549571dd9e4364a 100644 (file)
@@ -7,6 +7,7 @@
         .export         _cgetc
         .import         cursor
 
+        .include        "cbm_kernal.inc"
         .include        "plus4.inc"
 
 
@@ -56,12 +57,14 @@ L2:     jsr     KBDREAD         ; Read char and return in A
         .constructor    initkbd
         .destructor     donekbd
 
-.segment        "INIT"
+.segment        "ONCE"
 
 .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,6 +72,8 @@ L2:     jsr     KBDREAD         ; Read char and return in A
 
 .endproc
 
+fnkeys: .byte   133, 137, 134, 138, 135, 139, 136, 140
+
 
 .code
 
@@ -82,11 +87,3 @@ L2:     jsr     KBDREAD         ; Read char and return in A
         rts
 
 .endproc
-
-
-; Function key table, readonly
-
-.rodata
-fnkeys: .byte   $01, $01, $01, $01, $01, $01, $01, $01
-        .byte   133, 137, 134, 138, 135, 139, 136, 140
-