mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-22 05:32:28 +00:00
Moved Retro-Forth editor to generic sources
This commit is contained in:
parent
97f4e08b02
commit
d2369b790f
@ -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 )
|
\ 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 )
|
@ -16,7 +16,7 @@ Screen 0 not modified
|
|||||||
14
|
14
|
||||||
15
|
15
|
||||||
Screen 1 not modified
|
Screen 1 not modified
|
||||||
0 \ RetroForth Editor for VolksForth 1/2
|
0 \ RetroForth Editor for VolksForth 1/2 19july2020
|
||||||
1
|
1
|
||||||
2 16 constant l/b
|
2 16 constant l/b
|
||||||
3
|
3
|
||||||
@ -38,7 +38,7 @@ Screen 2 not modified
|
|||||||
2 : v* update v ;
|
2 : v* update v ;
|
||||||
3 : s dup scr ! block drop v ;
|
3 : s dup scr ! block drop v ;
|
||||||
4 : ia (line) + >r 10 parse r> swap move 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* ;
|
6 : d (line) c/l bl fill v* ;
|
||||||
7 : x (block) l/b c/l * bl fill v* ;
|
7 : x (block) l/b c/l * bl fill v* ;
|
||||||
8 : p -1 scr +! v ;
|
8 : p -1 scr +! v ;
|
||||||
|
Loading…
Reference in New Issue
Block a user