1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 17:48:05 +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 ;
: $G ACC @ selblk 0acc ;
: $[ BLK> @ acc@ - selblk ;
: $] BLK> @ acc@ + selblk ;
: $H -1 cmv ; : $L 1 cmv ; : $K -64 cmv ; : $J 64 cmv ;
2020-06-05 07:22:07 +10:00
: $W POS @ BLK( + BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL
1- BLK( - 1023 MIN POS ! ;
: $S POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;