1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00
cc65/libsrc/atari/cgetc.s

32 lines
559 B
ArmAsm
Raw Normal View History

;
; Christian Groessler, November-2002
;
; get a char from the keyboard
; char cgetc(void)
;
.include "atari.inc"
.export _cgetc
.import setcursor
.import KEYBDV_handler
_cgetc:
jsr setcursor
2013-05-30 23:38:16 +00:00
lda #12
sta ICAX1Z ; fix problems with direct call to KEYBDV
.ifdef __ATARIXL__
jsr KEYBDV_handler
.else
jsr @1
2013-05-30 23:38:16 +00:00
.endif
ldx #0
rts
.ifndef __ATARIXL__
@1: lda KEYBDV+5
pha
lda KEYBDV+4
pha
rts
2013-05-30 23:38:16 +00:00
.endif