]> git.sur5r.net Git - cc65/commitdiff
Fixed capslock on startup
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 14 Apr 2003 14:45:47 +0000 (14:45 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 14 Apr 2003 14:45:47 +0000 (14:45 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2051 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atmos/atmos.inc
libsrc/atmos/cgetc.s

index c144a7db9debbe487bc4160bde45a061235f8572..54ca3b83da750e33ce22efc95a8ae3af6c6f1149 100644 (file)
@@ -10,7 +10,8 @@
 
 ; ---------------------------------------------------------------------------
 ; Low memory
-
+                       
+CAPSLOCK        = $20C
 CURS_Y          = $268
 CURS_X          = $269
 STATUS          = $26A
@@ -20,7 +21,7 @@ KEYBUF          = $2DF
 
 ; ---------------------------------------------------------------------------
 ; ROM entries
-                      
+
 PRINT           = $F77C
 
 
index b927af6c69f77f031cab3d98b2896bbe3a87afc7..e8f96abb32381ef50c8108212138e6198f9bf192 100644 (file)
@@ -5,8 +5,7 @@
 ;
 
        .export         _cgetc
-        .constructor    cursoroff
-        .destructor     cursoron
+        .constructor    initcgetc
        .import         cursor
 
        .include        "atmos.inc"
 
         lda     cursor          ; Cursor currently off?
         beq     @L1             ; Skip if so
-        jsr     cursoron
+        lda     STATUS
+        ora     #%00000001      ; Cursor ON
+        sta     STATUS
 @L1:    lda     KEYBUF
         bpl     @L1
 
 ; If the cursor was enabled, disable it now
 
         ldx     cursor
-        beq     @L3
+        beq     @L2
+        ldx     #$00            ; Zero high byte
         dec     STATUS          ; Clear bit zero
 
 ; We have the character, clear avail flag
 
 ; Done
 
-@L3:    ldx     #$00
         rts
 
 .endproc
 
 ; ------------------------------------------------------------------------
-; Switch the cursor on
-
-cursoron:
-        lda     STATUS
-        ora     #%00000001
-        sta     STATUS
-        rts
-
-; ------------------------------------------------------------------------
-; Switch the cursor off
+; Switch the cursor off, disable capslock
 
-cursoroff:
+initcgetc:
         lda     STATUS
         and     #%11111110
         sta     STATUS
+        lda     #$7F
+        sta     CAPSLOCK
         rts