mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:40:56 +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 ! ;
|
|
: $S POS @ BLK( + BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL
|
|
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;
|