1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-02 00:31:03 +11:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Virgil Dupras
bc951a5ff1 ed and VE: add command Y 2020-06-10 17:27:14 -04:00
Virgil Dupras
8f0e51a21c VE: make D copy first deleted line to IBUF 2020-06-10 16:59:12 -04:00
Virgil Dupras
6a6c59300e VE: make ACC reset after each non-digit keystrokes
It simplifies things. Also, removed ';' which became useless.
2020-06-10 16:54:36 -04:00
9 changed files with 19 additions and 17 deletions

View File

@ -12,5 +12,5 @@ F xxx: find typed FBUF in block, starting from current
position+1. If not found, don't move.
I xxx: insert typed IBUF at cursor. "I" shadows core word. Use
"i" to access it.
X ( n -- ): Delete X chars after cursor and place in IBUF.
E: Run X with n = length of FBUF.
Y: Copy n characters after cursor into IBUF, n being length of
FBUF. (cont.)

2
blk/102 Normal file
View File

@ -0,0 +1,2 @@
X ( n -- ): Delete X chars after cursor and place in IBUF.
E: Run X with n = length of FBUF.

View File

@ -8,4 +8,4 @@
SWAP 0 FILL
EDPOS @ 64 / _pln ;
: E FBUF _blen X ;
: Y FBUF _blen icpy ;

View File

@ -13,4 +13,4 @@ saved beforehand.
'[' and ']' advances the selected block by "modifier".
';' resets the modifier. 'q' quits. (cont.)
(cont.)

View File

@ -6,11 +6,11 @@
'w' moves forward by "modifier" words. 'b' moves backward.
'W' moves to end-of-word. 'B', backwards.
'I', 'F', 'X' and 'E' invoke the corresponding command from the
Block Editor (B100). Refer to documentation there.
'I', 'F', 'Y', 'X' and 'E' invoke the corresponding command
from the Block Editor (B100). Refer to documentation there.
'o' inserts a blank line after the cursor. 'O', before.
'D' deletes "modifier" lines at the cursor.
'D' deletes "modifier" lines at the cursor. The first of those
lines is copied to IBUF.
(cont.)

View File

@ -1,7 +1,6 @@
CREATE CMD 2 C, '$' C, 0 C,
VARIABLE PREVPOS
: 0acc 0 ACC ! ;
: acc@ ACC @ 1 MAX 0acc ;
: acc@ ACC @ 1 MAX ;
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
: nspcs ( n -- , spit n space ) 0 DO SPC LOOP ;
: aty 0 SWAP AT-XY ;

View File

@ -1,12 +1,12 @@
: $; 0acc ;
: $g ACC @ selblk 0acc ;
: $g ACC @ selblk ;
: $[ BLK> @ acc@ - selblk ;
: $] BLK> @ acc@ + selblk ;
: $I mode! 'I' EMIT IBUF 1 buftype _I contents mode! SPC ;
: $F mode! 'F' EMIT FBUF 2 buftype _F setpos mode! SPC ;
: $Y Y ;
: $E E contents ;
: $X acc@ X contents ;
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
: $H 0acc EDPOS @ 0x3c0 AND pos! ;
: $L 0acc EDPOS @ 0x3f OR pos! ;
: $H EDPOS @ 0x3c0 AND pos! ;
: $L EDPOS @ 0x3f OR pos! ;

View File

@ -10,5 +10,6 @@
: $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN
_U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
: $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ;
: $D acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
: $D $H 64 icpy
acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
BLK!! contents ;

View File

@ -1,7 +1,7 @@
: handle ( c -- f )
DUP '0' '9' =><= IF num 0 EXIT THEN
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
UPPER 'Q' = ;
0 ACC ! UPPER 'Q' = ;
: bufp ( buf -- )
DUP 64 + SWAP DO i C@ 0x20 MAX EMIT LOOP ;
: bufs
@ -9,6 +9,6 @@
2 aty ." F: " FBUF bufp ;
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
: VE ['] c<over 0x08 ( C< override ) RAM+ !
clrscr 0acc 0 PREVPOS ! contents
clrscr 0 ACC ! 0 PREVPOS ! contents
BEGIN status bufs setpos KEY handle UNTIL
0 0x08 RAM+ ! 19 aty ;