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-06-05 12:54:27 +10:00
|
|
|
3 + ( header ) SWAP 3 + ( gutter ) 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 -- )
|
|
|
|
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
|
|
|
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
2020-06-12 04:48:18 +10:00
|
|
|
SWAP DUP _zbuf C!+ DUP 63 + SWAP DO
|
|
|
|
C< DUP 0x0d = IF LEAVE THEN i C! LOOP ;
|
2020-06-12 08:12:01 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|