From 3abf7993ce2d2deb1c0596f3404b2bfa27324564 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 17 Feb 2016 23:47:59 -0500 Subject: make the cursor behave *much* better, via custom conio function --- conio/cgetc.s | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 conio/cgetc.s (limited to 'conio/cgetc.s') diff --git a/conio/cgetc.s b/conio/cgetc.s new file mode 100644 index 0000000..d1ae705 --- /dev/null +++ b/conio/cgetc.s @@ -0,0 +1,31 @@ +; +; Christian Groessler, November-2002 +; +; get a char from the keyboard +; char cgetc(void) +; + + .include "atari.inc" + .export _cgetc + .import KEYBDV_handler + .import cursor,mul40 + +_cgetc: + lda #12 + sta ICAX1Z ; fix problems with direct call to KEYBDV +.ifdef __ATARIXL__ + jsr KEYBDV_handler +.else + jsr @1 +.endif + ldx #0 + rts + +.ifndef __ATARIXL__ +@1: lda KEYBDV+5 + pha + lda KEYBDV+4 + pha + rts +.endif + -- cgit v1.2.3