2020-06-04 10:39:59 -04:00
|
|
|
CREATE CMD 2 C, '$' C, 0 C,
|
2020-06-06 21:46:46 -04:00
|
|
|
VARIABLE PREVPOS
|
2020-06-04 10:39:59 -04:00
|
|
|
: 0acc 0 ACC ! ;
|
2020-06-04 12:04:13 -04:00
|
|
|
: acc@ ACC @ 1 MAX 0acc ;
|
2020-06-04 10:39:59 -04:00
|
|
|
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
|
|
|
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
|
|
|
: aty 0 SWAP AT-XY ;
|
2020-06-05 10:38:05 -04:00
|
|
|
: clrscr LINES 0 DO i aty COLS nspcs LOOP ;
|
|
|
|
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
|
|
|
|
SPC EDPOS @ 64 /MOD . ',' EMIT . 10 nspcs ;
|
2020-06-04 22:54:27 -04:00
|
|
|
: contents 3 aty BLK> @ LIST ;
|
2020-06-04 12:04:13 -04:00
|
|
|
: selblk BLK@ contents ;
|
2020-06-05 10:38:05 -04:00
|
|
|
: mode! ( c -- ) 63 0 AT-XY ;
|
2020-06-06 21:46:46 -04:00
|
|
|
: pos! EDPOS @ PREVPOS !
|
|
|
|
1023 MIN DUP 0< IF DROP 0 THEN EDPOS ! ;
|