mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-29 05:49:26 +00:00
35 lines
2.2 KiB
Plaintext
35 lines
2.2 KiB
Plaintext
|
Screen 0 not modified
|
||
|
0 \ Copy und Convey 19Nov87
|
||
|
1
|
||
|
2 Dieses File enthaelt Definitionen, die urspruenglich im Kern
|
||
|
3 enthalten waren. Sie sind jetzt ausgelagert worden, um den Kern
|
||
|
4 klein zu halten.
|
||
|
5
|
||
|
6 copy kopiert einen Screen
|
||
|
7
|
||
|
8 convey kopiert einen Bereich von Screens
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
Screen 1 not modified
|
||
|
0 \ moving blocks 20Oct86 19Nov87
|
||
|
1 | : full? ( -- flag ) prev BEGIN @ dup @ 0= UNTIL 6 + @ 0< ;
|
||
|
2 | : fromblock ( blk -- adr ) fromfile @ (block ;
|
||
|
3 | : (copy ( from to -- )
|
||
|
4 dup isfile@ core? IF prev @ emptybuf THEN
|
||
|
5 full? IF save-buffers THEN
|
||
|
6 offset @ + isfile@ rot fromblock 6 - 2! update ;
|
||
|
7 | : blkmove ( from to quan --) save-buffers >r
|
||
|
8 over r@ + over u> >r 2dup u< r> and
|
||
|
9 IF r@ r@ d+ r> 0 ?DO -1 -2 d+ 2dup (copy LOOP
|
||
|
10 ELSE r> 0 ?DO 2dup (copy 1 1 d+ LOOP THEN
|
||
|
11 save-buffers 2drop ;
|
||
|
12
|
||
|
13 : copy ( from to --) 1 blkmove ;
|
||
|
14 : convey ( [blk1 blk2] [to.blk --)
|
||
|
15 swap 1+ 2 pick - dup 0> not Abort" Nein !" blkmove ;
|