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.

17 line
654B

  1. : $f EDPOS @ PREVPOS @ 2DUP = IF 2DROP EXIT THEN
  2. 2DUP > IF DUP pos! SWAP THEN
  3. ( p1 p2, p1 < p2 ) OVER - 64 MIN ( pos len ) FBUF _zbuf
  4. SWAP _cpos FBUF ( len src dst ) ROT MOVE ;
  5. : $R ( replace mode )
  6. mode! 'R' EMIT
  7. BEGIN setpos KEY DUP BS? IF -1 EDPOS +! DROP 0 THEN
  8. DUP 0x20 >= IF
  9. DUP EMIT EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
  10. THEN UNTIL mode! SPC contents ;
  11. : $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN
  12. _U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
  13. : $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ;
  14. : $D $H 64 icpy
  15. acc@ 0 DO 16 EDPOS @ 64 / DO I _mvln- LOOP LOOP
  16. BLK!! contents ;