Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
434B

  1. : pos! ( newpos -- ) EDPOS @ PREVPOS !
  2. DUP 0< IF DROP 0 THEN 1023 MIN EDPOS ! ;
  3. : setpos ( -- ) EDPOS @ 64 /MOD
  4. 3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
  5. : cmv ( n -- , char movement ) acc@ * EDPOS @ + pos! ;
  6. : buftype ( buf ln -- )
  7. 3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
  8. ( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
  9. SWAP DUP _zbuf BEGIN ( c a )
  10. C!+ C< TUCK 0x0d = UNTIL ( c a ) C! ;