mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-26 17:49:18 +00:00
52 lines
3.3 KiB
Plaintext
52 lines
3.3 KiB
Plaintext
Screen 0 not modified
|
|
0 \\ Undo for the VolksForth command line cas2013apr05
|
|
1
|
|
2 The tool extends the VolksForth "decode" function
|
|
3 with an UNDO. If there was a typo in the previous line
|
|
4 pressing the UNDO key will re-fetch the last entered line so
|
|
5 that it can be edited
|
|
6
|
|
7 Published in VD 3/87 by Bernd Pennemann
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
Screen 1 not modified
|
|
0 \ Undo for Atari ST cas2013apr05
|
|
1 Onlyforth
|
|
2
|
|
3 | $6100 Constant #undo
|
|
4
|
|
5 : undoSTdecode ( addr pos1 key -- addr pos2 )
|
|
6 over 0= if
|
|
7 #undo case? if at? >r >r
|
|
8 over #tib @ dup span ! type
|
|
9 r> r> at exit then then
|
|
10 STdecode ;
|
|
11
|
|
12 Input: keyboard STkey STkey? undoSTdecode STexpect ;
|
|
13
|
|
14 keyboard save
|
|
15
|
|
Screen 2 not modified
|
|
0
|
|
1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|