2014-08-22 21:19:58 +00:00
|
|
|
;
|
|
|
|
; When Oric computers are in BASIC's command mode, the keyboard is in CAPS lock
|
|
|
|
; mode (because Oric BASIC keywords must be typed in upper-case). This
|
|
|
|
; constructor disables that mode, so that text will be typed as lower-case
|
|
|
|
; (which is the default on other cc65 platforms).
|
|
|
|
; This module is linked by the conio and POSIX input functions.
|
|
|
|
;
|
2014-09-04 21:37:41 +00:00
|
|
|
; 2014-09-04, Greg King
|
2014-08-22 21:19:58 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
.constructor disable_caps
|
2014-09-04 21:37:41 +00:00
|
|
|
.destructor restore_caps
|
2014-08-22 21:19:58 +00:00
|
|
|
|
|
|
|
.include "atmos.inc"
|
|
|
|
|
|
|
|
|
|
|
|
;--------------------------------------------------------------------------
|
2016-03-18 15:28:56 +00:00
|
|
|
; Put this constructor into a segment whose space
|
|
|
|
; will be re-used by BSS, the heap, and the C stack.
|
2014-08-22 21:19:58 +00:00
|
|
|
;
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "ONCE"
|
2014-08-22 21:19:58 +00:00
|
|
|
|
|
|
|
; Turn the capitals lock off.
|
|
|
|
|
|
|
|
disable_caps:
|
|
|
|
lda CAPSLOCK
|
|
|
|
sta capsave
|
|
|
|
lda #$7F
|
|
|
|
sta CAPSLOCK
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
2014-09-04 21:37:41 +00:00
|
|
|
;--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
.code
|
|
|
|
|
|
|
|
; Restore the old capitals-lock state.
|
|
|
|
|
|
|
|
restore_caps:
|
|
|
|
lda capsave
|
|
|
|
sta CAPSLOCK
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
2014-08-22 21:19:58 +00:00
|
|
|
;--------------------------------------------------------------------------
|
|
|
|
|
2016-03-16 15:28:32 +00:00
|
|
|
.segment "INIT"
|
2014-08-22 21:19:58 +00:00
|
|
|
|
|
|
|
capsave:
|
|
|
|
.res 1
|