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 11:56:54 +00:00
|
|
|
.include "atari.inc"
|
2017-10-03 19:58:52 +00:00
|
|
|
.export _cgetc
|
|
|
|
.import setcursor
|
2013-08-27 08:21:42 +00:00
|
|
|
.import KEYBDV_handler
|
2002-11-26 21:31:01 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
_cgetc:
|
2013-05-09 11:56:54 +00:00
|
|
|
jsr setcursor
|
2013-05-30 23:38:16 +00:00
|
|
|
lda #12
|
|
|
|
sta ICAX1Z ; fix problems with direct call to KEYBDV
|
2014-06-03 16:30:11 +00:00
|
|
|
.ifdef __ATARIXL__
|
2013-08-27 08:21:42 +00:00
|
|
|
jsr KEYBDV_handler
|
2014-06-03 16:30:11 +00:00
|
|
|
.else
|
|
|
|
jsr @1
|
2013-05-30 23:38:16 +00:00
|
|
|
.endif
|
2013-05-09 11:56:54 +00:00
|
|
|
ldx #0
|
|
|
|
rts
|
2001-12-04 01:04:20 +00:00
|
|
|
|
2013-09-19 20:36:22 +00:00
|
|
|
.ifndef __ATARIXL__
|
2013-08-27 08:21:42 +00:00
|
|
|
@1: lda KEYBDV+5
|
2013-05-09 11:56:54 +00:00
|
|
|
pha
|
|
|
|
lda KEYBDV+4
|
|
|
|
pha
|
2013-08-27 08:21:42 +00:00
|
|
|
rts
|
2013-05-30 23:38:16 +00:00
|
|
|
.endif
|