diff --git a/blk/101 b/blk/101 index 84c152b..7d0d913 100644 --- a/blk/101 +++ b/blk/101 @@ -5,7 +5,7 @@ F xxx: find typed string in block. I xxx: insert typed string at cursor. E: Delete previously found string. - +Note that "I" shadows core word. Use "i" to access core word. diff --git a/blk/102 b/blk/102 index f72edc7..faa13c5 100644 --- a/blk/102 +++ b/blk/102 @@ -1,5 +1,5 @@ '? CASE NOT [IF] 51 52 LOADR+ [THEN] DROP ( B152-153 ) -'? FILL NOT [IF] 53 LOAD+ [THEN] DROP ( B154 ) +'? FILL NOT [IF] 53 LOAD+ [THEN] DROP ( B155 ) 1 7 LOADR+ : BROWSE 0 ACC ! L @@ -12,5 +12,3 @@ ENDCASE AGAIN ; -( I masks DO..LOOP's I. Do it as late as possible. ) -: I _I ; diff --git a/blk/108 b/blk/108 index c6b50f7..761da06 100644 --- a/blk/108 +++ b/blk/108 @@ -2,7 +2,8 @@ DUP BEGIN C@+ EOL? UNTIL -^ 1- ; : _rbufsz ( size of linebuf to the right of curpos ) EDPOS @ 64 MOD 63 -^ ; -: _I +: i I ; ( save overshoadowed ) +: I IBUF _type _rbufsz IBUF _blen 2DUP > IF TUCK - ( ilen chars-to-move ) SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen ) diff --git a/blk/120 b/blk/120 index 5816624..a85c126 100644 --- a/blk/120 +++ b/blk/120 @@ -4,7 +4,8 @@ This editor, unlike the Block Editor (B100), is grid-based instead of being command-based. It requires the AT-XY, COLS and LINES words to be implemented. -It is loaded with "125 LOAD" and invoked with "VE". +It is loaded with "125 LOAD" and invoked with "VE". Note that +this also fully loads the Block Editor (B100). This editor uses 17 lines. The top line is the status line and the 16 others are contents lines. The content shown is that @@ -12,5 +13,4 @@ of the currently selected block. All keystrokes are directly interpreted by VE and have the effect described below. - (cont.) diff --git a/blk/125 b/blk/125 index 12c928d..6ba00a5 100644 --- a/blk/125 +++ b/blk/125 @@ -1,2 +1,3 @@ '? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 ) +-23 LOAD+ ( B102, block editor ) 1 4 LOADR+ diff --git a/blk/126 b/blk/126 index 5b0d37f..329382a 100644 --- a/blk/126 +++ b/blk/126 @@ -1,13 +1,13 @@ CREATE CMD 2 C, '$' C, 0 C, -VARIABLE MODE VARIABLE MODEC VARIABLE ACC VARIABLE POS +VARIABLE MODE VARIABLE MODEC : 0acc 0 ACC ! ; : acc@ ACC @ 1 MAX 0acc ; : num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ; : nspcs ( n -- , spit n space ) 0 DO SPC LOOP ; : aty 0 SWAP AT-XY ; : clrln DUP aty COLS nspcs aty ; -: clrscr LINES 0 DO I clrln LOOP ; +: clrscr LINES 0 DO i clrln LOOP ; : status 0 clrln ." BLK" SPC BLK> ? SPC ACC ? - SPC POS @ 64 /MOD . ',' EMIT . SPC MODEC C@ EMIT ; + SPC EDPOS @ 64 /MOD . ',' EMIT . SPC MODEC C@ EMIT ; : contents 1 aty BLK> @ LIST ; : selblk BLK@ contents ; diff --git a/blk/127 b/blk/127 index 2b51cfc..9119bbb 100644 --- a/blk/127 +++ b/blk/127 @@ -1,11 +1,11 @@ -: setpos POS @ 64 /MOD +: setpos EDPOS @ 64 /MOD 1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ; -: pos+ POS @ + 1024 MOD POS ! ; +: pos+ EDPOS @ + 1024 MOD EDPOS ! ; : cmv ( n -- , char movement ) acc@ * pos+ ; : $; 0acc ; : $g ACC @ selblk 0acc ; : $[ BLK> @ acc@ - selblk ; : $] BLK> @ acc@ + selblk ; : $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ; -: $H 0acc POS @ 0x3c0 AND POS ! ; -: $L 0acc POS @ 0x3f OR POS ! ; +: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ; +: $L 0acc EDPOS @ 0x3f OR EDPOS ! ; diff --git a/blk/128 b/blk/128 index 8a13b7e..b9c2563 100644 --- a/blk/128 +++ b/blk/128 @@ -1,9 +1,9 @@ -: $w POS @ BLK( + acc@ 0 DO +: $w EDPOS @ BLK( + acc@ 0 DO BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP - 1- BLK( - 1023 MIN POS ! ; -: $W POS @ BLK( + acc@ 0 DO + 1- BLK( - 1023 MIN EDPOS ! ; +: $W EDPOS @ BLK( + acc@ 0 DO BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP - 1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ; + 1+ BLK( - DUP 0< IF DROP 0 THEN EDPOS ! ; : handleM ( c -- f ) DUP '0' '9' =><= IF num 0 EXIT THEN DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN diff --git a/blk/129 b/blk/129 index 849f8eb..71d3301 100644 --- a/blk/129 +++ b/blk/129 @@ -1,3 +1,3 @@ -: VE clrscr 0acc 0 POS ! modeM contents +: VE clrscr 0acc 0 EDPOS ! modeM contents BEGIN status setpos KEY MODE @ EXECUTE UNTIL 18 aty ;