collapseos/blk/126
Virgil Dupras e7a6c777c7 VE: refactor mode indicators
The indicator is going to be empty most of the time and will be
emitted by the mode changer directly. That's going to the upper-right
corner and the status bar avoids emitting in that area.
2020-06-05 10:38:05 -04:00

14 lines
426 B
Plaintext

CREATE CMD 2 C, '$' C, 0 C,
VARIABLE MODE
: 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 ;
: clrscr LINES 0 DO i aty COLS nspcs LOOP ;
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
SPC EDPOS @ 64 /MOD . ',' EMIT . 10 nspcs ;
: contents 3 aty BLK> @ LIST ;
: selblk BLK@ contents ;
: mode! ( c -- ) 63 0 AT-XY ;