2020-04-30 20:42:07 -04:00
|
|
|
( Cursor position in buffer. EDPOS/64 is line number )
|
2020-06-07 16:16:07 -04:00
|
|
|
CREATE EDPOS 0 ,
|
|
|
|
CREATE IBUF 64 ALLOT0
|
|
|
|
CREATE FBUF 64 ALLOT0
|
2020-04-30 20:42:07 -04:00
|
|
|
: _cpos BLK( + ;
|
|
|
|
: _lpos 64 * _cpos ;
|
|
|
|
: _pln ( lineno -- )
|
|
|
|
DUP _lpos DUP 64 + SWAP DO ( lno )
|
|
|
|
I EDPOS @ _cpos = IF '^' EMIT THEN
|
|
|
|
I C@ DUP 0x20 < IF DROP 0x20 THEN
|
|
|
|
EMIT
|
2020-05-01 13:17:40 -04:00
|
|
|
LOOP ( lno ) 1+ . ;
|
2020-05-01 21:52:38 -04:00
|
|
|
: _zbuf 64 0 FILL ; ( buf -- )
|