mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-05 04:05:43 +00:00
52 lines
3.3 KiB
Plaintext
52 lines
3.3 KiB
Plaintext
Screen 0 not modified
|
|
0 \\ Retro Forth Editor cas20130106
|
|
1
|
|
2 This is a port of the Retro Forth Editor from
|
|
3 http://retroforth.org
|
|
4
|
|
5 Functions:
|
|
6 <b> s Select a new block <b>
|
|
7 p Previous block
|
|
8 n Next block
|
|
9 <l> i ... Insert ... into line <l>
|
|
10 <c> <l> ia ... Insert ... into line <l> at column <c>
|
|
11 x Clear (erase) the current block
|
|
12 <l> Clear line <l>
|
|
13 v Display current block
|
|
14 e Evaluate (load) current block
|
|
15
|
|
Screen 1 not modified
|
|
0 .( Retro Forth block editor volksForth Atari ST) \ cas20130106
|
|
1 $10 constant l/b cr
|
|
2 : (block) scr @ block ; : (line) c/l * (block) + ;
|
|
3 : row dup c/l type c/l + cr ; : .rows l/b 0 do i . row loop ;
|
|
4 : .block ." Block: " scr @ dup . updated? abs $2A + emit space ;
|
|
5 : +--- ." +---" ; : :--- ." :---" ;
|
|
6 : x--- +--- :--- +--- :--- ;
|
|
7 : --- space space x--- x--- x--- x--- cr ;
|
|
8 : vb --- scr @ block .rows drop --- ;
|
|
9 : .stack ." Stack: " .s ; : status .block .stack ;
|
|
10 : v cr vb status ; : v* update v ; : s dup scr ! block drop v ;
|
|
11 : ia (line) + >r &10 parse r> swap move v* ;
|
|
12 : i 0 swap ia ; : d (line) c/l bl fill v* ;
|
|
13 : x (block) l/b c/l * bl fill v* ; : p -1 scr +! v ;
|
|
14 : n 1 scr +! v ; : e scr @ load ;
|
|
15 cr .( editor loaded ) cr
|
|
Screen 2 not modified
|
|
0
|
|
1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|