2000-05-28 13:40:48 +00:00
|
|
|
;
|
2002-11-03 22:10:55 +00:00
|
|
|
; Christian Groessler, November-2002
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
2002-11-03 22:10:55 +00:00
|
|
|
; get a char from the keyboard
|
2000-05-28 13:40:48 +00:00
|
|
|
; char cgetc(void)
|
|
|
|
;
|
|
|
|
|
2013-05-09 13:56:54 +02:00
|
|
|
.include "atari.inc"
|
2017-10-03 21:58:52 +02:00
|
|
|
.export _cgetc
|
|
|
|
.import setcursor
|
2013-08-27 10:21:42 +02:00
|
|
|
.import KEYBDV_handler
|
2002-11-26 21:31:01 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
_cgetc:
|
2013-05-09 13:56:54 +02:00
|
|
|
jsr setcursor
|
2013-05-31 01:38:16 +02:00
|
|
|
lda #12
|
|
|
|
sta ICAX1Z ; fix problems with direct call to KEYBDV
|
2014-06-03 18:30:11 +02:00
|
|
|
.ifdef __ATARIXL__
|
2013-08-27 10:21:42 +02:00
|
|
|
jsr KEYBDV_handler
|
2014-06-03 18:30:11 +02:00
|
|
|
.else
|
|
|
|
jsr @1
|
2013-05-31 01:38:16 +02:00
|
|
|
.endif
|
2013-05-09 13:56:54 +02:00
|
|
|
ldx #0
|
|
|
|
rts
|
2001-12-04 01:04:20 +00:00
|
|
|
|
2013-09-19 22:36:22 +02:00
|
|
|
.ifndef __ATARIXL__
|
2013-08-27 10:21:42 +02:00
|
|
|
@1: lda KEYBDV+5
|
2013-05-09 13:56:54 +02:00
|
|
|
pha
|
|
|
|
lda KEYBDV+4
|
|
|
|
pha
|
2013-08-27 10:21:42 +02:00
|
|
|
rts
|
2013-05-31 01:38:16 +02:00
|
|
|
.endif
|