1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 01:58:06 +11:00
collapseos/blk/127

16 lines
542 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 ;
2020-06-05 08:59:54 +10:00
: $w POS @ BLK( + acc@ 0 DO
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
2020-06-05 07:22:07 +10:00
1- BLK( - 1023 MIN POS ! ;
2020-06-05 08:59:54 +10:00
: $W POS @ BLK( + acc@ 0 DO
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
2020-06-05 07:22:07 +10:00
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;