; (which is the default on other cc65 platforms).
; This module is linked by the conio and POSIX input functions.
;
-; 2014-08-22, Greg King
+; 2014-09-04, Greg King
;
- .destructor restore_caps
.constructor disable_caps
+ .destructor restore_caps
.include "atmos.inc"
-;--------------------------------------------------------------------------
-
-; Restore the old capitals-lock state.
-
-restore_caps:
- lda capsave
- sta CAPSLOCK
- rts
-
-
;--------------------------------------------------------------------------
; Put this constructor into a segment that can be re-used by programs.
;
rts
+;--------------------------------------------------------------------------
+
+.code
+
+; Restore the old capitals-lock state.
+
+restore_caps:
+ lda capsave
+ sta CAPSLOCK
+ rts
+
+
;--------------------------------------------------------------------------
.bss
;
; 2003-04-13, Ullrich von Bassewitz
-; 2014-08-22, Greg King
+; 2014-09-04, Greg King
;
; char cgetc (void);
;
beq @L2
dec STATUS ; Clear bit zero
-; We have the character, clear avail flag
+; We have the character, clear the "available" flag
@L2: and #$7F ; Mask out avail flag
sta KEYBUF
- ldx #>0
+ ldx #>$0000
ldy MODEKEY
cpy #FUNCTKEY
bne @L3
- ora #$80 ; FUNCT pressed
+ ora #$80 ; FUNCT-key pressed
; Done