From 224e9183fb499289a157fbb0e8ef6b1bb6662c1d Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 17 Nov 2020 11:52:54 -0500 Subject: [PATCH] cvm: fix NEWLN behavior I hadn't noticed yet, but making CVM use the Grid subsystem made me lose scrolling. It's fine because that scrolling was "artificial" in the sense that it was provided by curses, not Collapse OS and I prefer having something that closer emulates a real machine. However, CVM didn't properly clear the new line when entering it. Fixed. Scrolling behavior will come back when it's implemented in the Grid subsystem. --- cvm/forth.c | 2 +- cvm/forth.fs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cvm/forth.c b/cvm/forth.c index 764b570..f8f4a98 100644 --- a/cvm/forth.c +++ b/cvm/forth.c @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) // debug panel dw = newwin(1, 30, LINES-1, COLS-30); w = newwin(WLINES, WCOLS, 1, 1); - scrollok(w, 1); + scrollok(w, 0); while (VM_steps(1000)) { debug_panel(); } diff --git a/cvm/forth.fs b/cvm/forth.fs index e72e66f..ef7b325 100644 --- a/cvm/forth.fs +++ b/cvm/forth.fs @@ -2,7 +2,6 @@ : CURSOR! ( new old -- ) DROP COLS /MOD 6 PC! ( y ) 5 PC! ( x ) ; : CELL! ( c pos -- ) 0 CURSOR! 0 PC! ; -: NEWLN ( ln -- ) DROP 0xa 0 PC! ; SYSVARS 0x70 + CONSTANT GRID_MEM 402 403 LOADR ( Grid )