From: cuz Date: Mon, 14 Apr 2003 14:45:47 +0000 (+0000) Subject: Fixed capslock on startup X-Git-Tag: V2.12.0~1643 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c3b242339c8b2201a891677319302ee624806e62;p=cc65 Fixed capslock on startup git-svn-id: svn://svn.cc65.org/cc65/trunk@2051 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/atmos/atmos.inc b/libsrc/atmos/atmos.inc index c144a7db9..54ca3b83d 100644 --- a/libsrc/atmos/atmos.inc +++ b/libsrc/atmos/atmos.inc @@ -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 diff --git a/libsrc/atmos/cgetc.s b/libsrc/atmos/cgetc.s index b927af6c6..e8f96abb3 100644 --- a/libsrc/atmos/cgetc.s +++ b/libsrc/atmos/cgetc.s @@ -5,8 +5,7 @@ ; .export _cgetc - .constructor cursoroff - .destructor cursoron + .constructor initcgetc .import cursor .include "atmos.inc" @@ -25,14 +24,17 @@ 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 @@ -42,26 +44,18 @@ ; 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