From dbf4e07b954d92fb72dbd2b025e04654dbacff21 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 26 Sep 2021 19:44:12 -0400 Subject: [PATCH] save restore cursor --- vt100.esc.S | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/vt100.esc.S b/vt100.esc.S index 6da2c5b..4a37730 100644 --- a/vt100.esc.S +++ b/vt100.esc.S @@ -133,9 +133,22 @@ vt100_esc ent esc_7 ; save cursor position, graphic rendition, and character set. + + lda x + sta saved_x + lda y + sta saved_y + rts esc_8 ; restore cursor position, graphic rendition, and character set. - rts + +* TODO - how does this interact with DECOM? + + lda saved_x + sta x + lda saved_y + sta y + jmp recalc_cursor esc_eq ; enter alternate keypad mode lda #$80