From 52b3efa3cae299a2df153f3a33a6de3dc9b6d1ad Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 3 Jan 2016 04:16:11 -0500 Subject: cursor visibility fixes --- timed_getch.s | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'timed_getch.s') diff --git a/timed_getch.s b/timed_getch.s index a5ac4d5..3259d7e 100644 --- a/timed_getch.s +++ b/timed_getch.s @@ -1,6 +1,6 @@ .export _timed_getch, _set_jiffy_timer, _agetc, _numgetc, _yngetc, _lcgetc - .import _cgetc, _cblank + .import _cgetc, _cblank, _cursor .include "atari.inc" @@ -42,10 +42,11 @@ done: ; (such as clear, delete, escape) are replaced with a space. ; extern char lcgetc(); _agetc: -; lda #0 ; show cursor -; sta CRSINH -; lda #$20 -; jsr _cblank + lda #1 ; show cursor + jsr _cursor + sta FR0+2 ; save old cursor status + lda #1 + jsr _cblank jsr _cgetc ; get ATASCII code of keypress @@ -70,8 +71,12 @@ notcontrol: bcc ok ; (remember, $7e, backspace, was handled above) lda #$20 ok: -; ldx #$01 ; hide cursor -; stx CRSINH + pha + lda #1 + lda FR0+2 + jsr _cursor + pla + ldx #0 rts _lcgetc: -- cgit v1.2.3