mirror of
https://github.com/cc65/cc65.git
synced 2025-02-25 16:29:08 +00:00
Swapped the locations of a constructor and a destructor in a source file.
The constructor now is first. Used a more expressive literal zero.
This commit is contained in:
parent
145a010e59
commit
970af0cdb2
@ -5,25 +5,15 @@
|
|||||||
; (which is the default on other cc65 platforms).
|
; (which is the default on other cc65 platforms).
|
||||||
; This module is linked by the conio and POSIX input functions.
|
; 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
|
.constructor disable_caps
|
||||||
|
.destructor restore_caps
|
||||||
|
|
||||||
.include "atmos.inc"
|
.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.
|
; Put this constructor into a segment that can be re-used by programs.
|
||||||
;
|
;
|
||||||
@ -39,6 +29,18 @@ disable_caps:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
|
; Restore the old capitals-lock state.
|
||||||
|
|
||||||
|
restore_caps:
|
||||||
|
lda capsave
|
||||||
|
sta CAPSLOCK
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------------------------------
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;
|
;
|
||||||
; 2003-04-13, Ullrich von Bassewitz
|
; 2003-04-13, Ullrich von Bassewitz
|
||||||
; 2014-08-22, Greg King
|
; 2014-09-04, Greg King
|
||||||
;
|
;
|
||||||
; char cgetc (void);
|
; char cgetc (void);
|
||||||
;
|
;
|
||||||
@ -38,15 +38,15 @@
|
|||||||
beq @L2
|
beq @L2
|
||||||
dec STATUS ; Clear bit zero
|
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
|
@L2: and #$7F ; Mask out avail flag
|
||||||
sta KEYBUF
|
sta KEYBUF
|
||||||
ldx #>0
|
ldx #>$0000
|
||||||
ldy MODEKEY
|
ldy MODEKEY
|
||||||
cpy #FUNCTKEY
|
cpy #FUNCTKEY
|
||||||
bne @L3
|
bne @L3
|
||||||
ora #$80 ; FUNCT pressed
|
ora #$80 ; FUNCT-key pressed
|
||||||
|
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user