2020-11-14 07:52:12 +11:00
|
|
|
: contents 16 0 DO large? IF 3 ELSE 0 THEN I 3 + AT-XY
|
|
|
|
64 I * BLK( + DUP 3 col- + SWAP DO
|
2020-11-14 07:19:00 +11:00
|
|
|
I C@ 0x20 MAX EMIT LOOP LOOP
|
2020-11-14 07:52:12 +11:00
|
|
|
large? IF 3 16 gutter THEN ;
|
2020-11-14 07:19:00 +11:00
|
|
|
: selblk BLK> @ PREVBLK ! BLK@ contents ;
|
2020-06-07 21:25:02 +10:00
|
|
|
: pos! ( newpos -- ) EDPOS @ PREVPOS !
|
|
|
|
DUP 0< IF DROP 0 THEN 1023 MIN EDPOS ! ;
|
|
|
|
: setpos ( -- ) EDPOS @ 64 /MOD
|
2020-11-14 07:52:12 +11:00
|
|
|
3 + ( header ) SWAP large? IF 3 + ( gutter ) THEN
|
|
|
|
SWAP AT-XY ;
|
2020-06-07 11:46:46 +10:00
|
|
|
: cmv ( n -- , char movement ) acc@ * EDPOS @ + pos! ;
|
2020-06-09 11:23:23 +10:00
|
|
|
: buftype ( buf ln -- )
|
2020-06-12 10:31:18 +10:00
|
|
|
3 OVER AT-XY KEY DUP EMIT
|
|
|
|
DUP 0x20 < IF 2DROP DROP EXIT THEN
|
2020-11-14 07:52:12 +11:00
|
|
|
( buf ln c ) 4 col- nspcs SWAP 4 SWAP AT-XY ( buf c )
|
|
|
|
SWAP C!+ IN( _zbuf (rdln) IN( SWAP 63 MOVE ;
|