1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 16:08:07 +11:00
collapseos/blk/127

14 lines
504 B
Plaintext
Raw Normal View History

2020-06-05 07:22:07 +10:00
: setpos POS @ 64 /MOD
1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ;
2020-06-05 02:04:13 +10:00
: pos+ POS @ + 1024 MOD POS ! ;
: cmv ( n -- , char movement ) acc@ * pos+ ;
: $; 0acc ;
2020-06-05 08:52:59 +10:00
: $g ACC @ selblk 0acc ;
2020-06-05 02:04:13 +10:00
: $[ BLK> @ acc@ - selblk ;
: $] BLK> @ acc@ + selblk ;
2020-06-05 08:52:59 +10: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-05 07:22:07 +10:00
1- BLK( - 1023 MIN POS ! ;
2020-06-05 08:52:59 +10:00
: $W POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
2020-06-05 07:22:07 +10:00
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;