1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-29 00:18:04 +11:00
collapseos/blk/126
Virgil Dupras 6a6c59300e VE: make ACC reset after each non-digit keystrokes
It simplifies things. Also, removed ';' which became useless.
2020-06-10 16:54:36 -04:00

13 lines
407 B
Plaintext

CREATE CMD 2 C, '$' C, 0 C,
VARIABLE PREVPOS
: acc@ ACC @ 1 MAX ;
: 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 ;