mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:48:05 +11:00
14 lines
504 B
Plaintext
14 lines
504 B
Plaintext
: setpos POS @ 64 /MOD
|
|
1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
|
: pos+ POS @ + 1024 MOD POS ! ;
|
|
: cmv ( n -- , char movement ) acc@ * pos+ ;
|
|
: $; 0acc ;
|
|
: $g ACC @ selblk 0acc ;
|
|
: $[ BLK> @ acc@ - selblk ;
|
|
: $] BLK> @ acc@ + selblk ;
|
|
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
|
|
: $w POS @ BLK( + BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL
|
|
1- BLK( - 1023 MIN POS ! ;
|
|
: $W POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
|
|
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;
|