2020-06-04 17:22:07 -04:00
|
|
|
: setpos POS @ 64 /MOD
|
|
|
|
1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
2020-06-04 12:04:13 -04:00
|
|
|
: pos+ POS @ + 1024 MOD POS ! ;
|
|
|
|
: cmv ( n -- , char movement ) acc@ * pos+ ;
|
|
|
|
: $; 0acc ;
|
2020-06-04 18:52:59 -04:00
|
|
|
: $g ACC @ selblk 0acc ;
|
2020-06-04 12:04:13 -04:00
|
|
|
: $[ BLK> @ acc@ - selblk ;
|
|
|
|
: $] BLK> @ acc@ + selblk ;
|
2020-06-04 18:52:59 -04:00
|
|
|
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
|
|
|
: $w POS @ BLK( + BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL
|
2020-06-04 17:22:07 -04:00
|
|
|
1- BLK( - 1023 MIN POS ! ;
|
2020-06-04 18:52:59 -04:00
|
|
|
: $W POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
|
2020-06-04 17:22:07 -04:00
|
|
|
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;
|