From 49d1e9f67f47b76ade39b2a4332e34fba72673fe Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 21 Apr 2018 21:42:02 -0400 Subject: [PATCH] fix a bug. --- ansi.asm | 9 +++------ vt100.c | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ansi.asm b/ansi.asm index 09b608f..714a8d1 100644 --- a/ansi.asm +++ b/ansi.asm @@ -84,15 +84,12 @@ _d equ 1 sbc >rows,x pha - ; ; mvn: -; while (--a != -1) -; dest[y++] = dest[x++]; +; do { src[y++] = dest[x++]; } while (--c != 0xffff) ; ; mvp: -; while(--a != -1) -; dest[y--] = dest[x--]; +; do { src[y--] = dest[x--]; } while (--c != 0xffff) @@ -364,7 +361,7 @@ _d equ 1 pha ; save length - ldx rows,x tax tay diff --git a/vt100.c b/vt100.c index 33136ce..704b2f9 100644 --- a/vt100.c +++ b/vt100.c @@ -35,6 +35,9 @@ int __x; int __y; +#define __brk() asm { brk 0xea } + + static unsigned saved_cursor[2]; // saved cursor position static unsigned window[2]; static unsigned and_mask; @@ -373,6 +376,7 @@ static void erase_line(void) { static void erase_screen(void) { unsigned i; + for (i = 0; i < parm_count; ++i) { switch(parms[i]) { case 0: