From 14ac1a7ff6cd26b862de76f4feab27be1f4974d4 Mon Sep 17 00:00:00 2001 From: jede Date: Wed, 3 Jul 2019 01:13:59 +0200 Subject: [PATCH] Fix bug : gotoxy does not working because Y does not update the adress on the screen --- libsrc/telestrat/gotoxy.s | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libsrc/telestrat/gotoxy.s b/libsrc/telestrat/gotoxy.s index e1470f848..03d0a215c 100644 --- a/libsrc/telestrat/gotoxy.s +++ b/libsrc/telestrat/gotoxy.s @@ -18,9 +18,27 @@ gotoxy: jsr popa ; Get Y ; This function moves only the display cursor; it does not move the prompt position. ; In telemon, there is a position for the prompt, and another for the cursor. - sta SCRY jsr popa sta SCRX + + lda #SCREEN + sta ADSCRL+1 + + ldy SCRY +loop: + lda ADSCRL + clc + adc #$28 + bcc skip + inc ADSCRH +skip: + sta ADSCRL + dey + bne loop + rts .endproc