2020-06-04 10:39:59 -04:00
|
|
|
CREATE CMD 2 C, '$' C, 0 C,
|
2020-11-13 20:44:39 -05:00
|
|
|
CREATE PREVPOS 0 , CREATE PREVBLK 0 , CREATE xoff 0 ,
|
2020-11-08 17:22:54 -05:00
|
|
|
: MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ;
|
|
|
|
: MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ;
|
2020-11-13 15:52:12 -05:00
|
|
|
: large? COLS 67 > ; : col- 67 COLS MIN -^ ;
|
2020-11-13 20:44:39 -05:00
|
|
|
: width large? IF 64 ELSE COLS THEN ;
|
|
|
|
: acc@ ACC @ 1 MAX ; : pos@ ( x y -- ) EDPOS @ 64 /MOD ;
|
2020-10-28 20:29:28 -04:00
|
|
|
: num ACC @ SWAP _pdacc IF ACC ! ELSE DROP THEN ;
|
2020-06-04 10:39:59 -04:00
|
|
|
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
|
|
|
|
: aty 0 SWAP AT-XY ;
|
2020-06-23 07:08:21 -04:00
|
|
|
: clrscr LINES 0 DO I aty COLS nspcs LOOP ;
|
|
|
|
: gutter ( ln n ) OVER + SWAP DO 67 I AT-XY '|' EMIT LOOP ;
|
2020-06-05 10:38:05 -04:00
|
|
|
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
|
2020-11-13 20:44:39 -05:00
|
|
|
SPC pos@ . ',' EMIT . xoff @ IF '>' EMIT THEN SPC
|
|
|
|
BLKDTY @ IF '*' EMIT THEN 4 nspcs ;
|
2020-11-13 15:19:00 -05:00
|
|
|
: nums 17 1 DO 2 I + aty I . SPC SPC LOOP ;
|