mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:30:56 +11:00
2bf4db59ed
Also, add MODE indirection.
14 lines
437 B
Plaintext
14 lines
437 B
Plaintext
CREATE CMD 2 C, '$' C, 0 C,
|
|
VARIABLE MODE VARIABLE ACC VARIABLE POS
|
|
: 0acc 0 ACC ! ;
|
|
: acc@ ACC @ 1 MAX 0acc ;
|
|
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
|
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
|
: aty 0 SWAP AT-XY ;
|
|
: clrln DUP aty COLS nspcs aty ;
|
|
: clrscr LINES 0 DO I clrln LOOP ;
|
|
: status 0 clrln ." BLK" SPC BLK> ? SPC ACC ?
|
|
SPC POS @ 64 /MOD . ',' EMIT . ;
|
|
: contents 1 aty BLK> @ LIST ;
|
|
: selblk BLK@ contents ;
|