diff --git a/blk/101 b/blk/101 index 2089d4b..4890ddf 100644 --- a/blk/101 +++ b/blk/101 @@ -2,7 +2,7 @@ T ( n -- ): select line n for editing. P xxx: put typed line on selected line. U xxx: insert typed line on selected line. F xxx: find typed string in block. - +I xxx: insert typed string at cursor diff --git a/blk/102 b/blk/102 index 210a603..26ad3bc 100644 --- a/blk/102 +++ b/blk/102 @@ -1,5 +1,5 @@ 50 LOAD+ ( B152, extras ) -1 5 LOADR+ +1 6 LOADR+ : BROWSE 0 ACC ! L diff --git a/blk/105 b/blk/105 index c62e3c5..2a3edab 100644 --- a/blk/105 +++ b/blk/105 @@ -1,5 +1,5 @@ : _type ( buf -- ) - C< DUP 0xd = IF DROP EXIT THEN OVER DUP _zbuf ( c a ) + C< DUP 0xd = IF 2DROP EXIT THEN OVER DUP _zbuf ( c a ) BEGIN ( c a ) C!+ C< SWAP OVER 0x0d = UNTIL ( c a ) C! ; diff --git a/blk/108 b/blk/108 new file mode 100644 index 0000000..1c7dd55 --- /dev/null +++ b/blk/108 @@ -0,0 +1,15 @@ +: _ilen ( length of str in IBUF ) + IBUF BEGIN C@+ EOL? UNTIL IBUF - 1- ; +: I + IBUF _type EDPOS @ 64 /MOD ( cno lno ) + 1+ 64 * _cpos ( cno next-line-ptr ) + SWAP 63 -^ _ilen ( nlp nb-of-chars-to-move ilen ) + 2DUP > IF + SWAP OVER - 1+ ( nlp ilen nbc ) 0 DO ( a ilen ) + SWAP 1- 2DUP -^ ( ilen a-1 a-ilen-1 ) C@ OVER C! + SWAP ( a ilen ) + LOOP + ELSE DROP ( ilen becomes nbc ) + THEN + SWAP DROP IBUF EDPOS @ _cpos ROT MOVE +; diff --git a/blk/456 b/blk/456 index 7b48c02..f34b504 100644 --- a/blk/456 +++ b/blk/456 @@ -1,10 +1,12 @@ : .2 DUP 10 < IF SPC THEN . ; - +: EOL? ( c -- f ) DUP 0xd = SWAP NOT OR ; : LIST BLK@ 16 0 DO I 1+ .2 SPC - 64 I * BLK( + (print) + 64 I * BLK( + DUP 64 + SWAP DO + I C@ DUP EOL? IF DROP LEAVE ELSE EMIT THEN + LOOP NL LOOP ; diff --git a/emul/forth.bin b/emul/forth.bin index 6c565b3..61a7629 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ