From d2369b790f29368979ca43191fa822c017863ff7 Mon Sep 17 00:00:00 2001 From: Carsten Strotmann Date: Sun, 19 Jul 2020 08:40:55 +0200 Subject: [PATCH] Moved Retro-Forth editor to generic sources --- {msdos => sources/generic}/rfe.fb | 2 +- sources/msdos/rfe.fb.src | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename {msdos => sources/generic}/rfe.fb (96%) diff --git a/msdos/rfe.fb b/sources/generic/rfe.fb similarity index 96% rename from msdos/rfe.fb rename to sources/generic/rfe.fb index 8caaccd..4d78d55 100644 --- a/msdos/rfe.fb +++ b/sources/generic/rfe.fb @@ -1 +1 @@ -\ Retro Forth Editor a simple forth-style editor use filename.fb :: open forth block file block# list :: list block v :: view current block x :: clear/zero block line# i text :: insert text at line line# d :: delete line n :: load next block p :: load previous block block# s :: load block e :: evaluate/load block \ RetroForth Editor for VolksForth 1/2 16 constant l/b : (block) scr @ block ; : (line) c/l * (block) + ; : row dup c/l -trailing type c/l + cr ; : .rows l/s 0 do i . row loop ; : .block ." BLOCK: " scr @ . space ; : +--- ." +---" ; : :--- ." :---" ; : x--- +--- :--- +--- :--- ; : --- space space x--- x--- x--- x--- cr ; : vb --- scr @ block .rows drop --- ; : .stack ." Stack: " .s ; : status .block .stack ; : v cr vb status ; --> \ RetroForth Editor for VolksForth 2/2 : v* update v ; : s dup scr ! block drop v ; : ia (line) + >r 10 parse r> swap move v* ; : i 0 swap ia v* ; : d (line) c/l bl fill v* ; : x (block) l/b c/l * bl fill v* ; : p -1 scr +! v ; : n 1 scr +! v ; : e scr @ load ; .( Retro Forth Editor loaded ) : x (block) l/b c/l * bl fill v* ; : p -1 scr +! v ; : n 1 scr +! v ; : e scr @ load ; .( RetroForth Editor loaded ) \ No newline at end of file +\ Retro Forth Editor a simple forth-style editor use filename.fb :: open forth block file block# list :: list block v :: view current block x :: clear/zero block line# i text :: insert text at line line# d :: delete line n :: load next block p :: load previous block block# s :: load block e :: evaluate/load block \ RetroForth Editor for VolksForth 1/2 19july2020 16 constant l/b : (block) scr @ block ; : (line) c/l * (block) + ; : row dup c/l -trailing type c/l + cr ; : .rows l/s 0 do i . row loop ; : .block ." BLOCK: " scr @ . space ; : +--- ." +---" ; : :--- ." :---" ; : x--- +--- :--- +--- :--- ; : --- space space x--- x--- x--- x--- cr ; : vb --- scr @ block .rows drop --- ; : .stack ." Stack: " .s ; : status .block .stack ; : v cr vb status ; --> \ RetroForth Editor for VolksForth 2/2 : v* update v ; : s dup scr ! block drop v ; : ia (line) + >r 10 parse r> swap move v* ; : i 0 swap ia ; : d (line) c/l bl fill v* ; : x (block) l/b c/l * bl fill v* ; : p -1 scr +! v ; : n 1 scr +! v ; : e scr @ load ; .( Retro Forth Editor loaded ) : x (block) l/b c/l * bl fill v* ; : p -1 scr +! v ; : n 1 scr +! v ; : e scr @ load ; .( RetroForth Editor loaded ) \ No newline at end of file diff --git a/sources/msdos/rfe.fb.src b/sources/msdos/rfe.fb.src index 0935a64..e7a6a71 100644 --- a/sources/msdos/rfe.fb.src +++ b/sources/msdos/rfe.fb.src @@ -16,7 +16,7 @@ Screen 0 not modified 14 15 Screen 1 not modified - 0 \ RetroForth Editor for VolksForth 1/2 + 0 \ RetroForth Editor for VolksForth 1/2 19july2020 1 2 16 constant l/b 3 @@ -38,7 +38,7 @@ Screen 2 not modified 2 : v* update v ; 3 : s dup scr ! block drop v ; 4 : ia (line) + >r 10 parse r> swap move v* ; - 5 : i 0 swap ia v* ; + 5 : i 0 swap ia ; 6 : d (line) c/l bl fill v* ; 7 : x (block) l/b c/l * bl fill v* ; 8 : p -1 scr +! v ;