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

Compare commits

..

No commits in common. "bc951a5ff1f451023caa09fa68f23ac6bd127799" and "c16c5c98ce56b7707adad3f71bdbd095feaf0dbe" have entirely different histories.

9 changed files with 17 additions and 19 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.
Y: Copy n characters after cursor into IBUF, n being length of
FBUF. (cont.)
X ( n -- ): Delete X chars after cursor and place in IBUF.
E: Run X with n = length of FBUF.

View File

@ -1,2 +0,0 @@
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".
(cont.)
';' resets the modifier. 'q' quits. (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', 'Y', 'X' and 'E' invoke the corresponding command
from the Block Editor (B100). Refer to documentation there.
'I', 'F', '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. The first of those
lines is copied to IBUF.
'D' deletes "modifier" lines at the cursor.
(cont.)

View File

@ -1,6 +1,7 @@
CREATE CMD 2 C, '$' C, 0 C,
VARIABLE PREVPOS
: acc@ ACC @ 1 MAX ;
: 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 ;

View File

@ -1,12 +1,12 @@
: $g ACC @ selblk ;
: $; 0acc ;
: $g ACC @ selblk 0acc ;
: $[ 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 EDPOS @ 0x3c0 AND pos! ;
: $L EDPOS @ 0x3f OR pos! ;
: $H 0acc EDPOS @ 0x3c0 AND pos! ;
: $L 0acc EDPOS @ 0x3f OR pos! ;

View File

@ -10,6 +10,5 @@
: $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 $H 64 icpy
acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
: $D 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
0 ACC ! UPPER 'Q' = ;
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 0 ACC ! 0 PREVPOS ! contents
clrscr 0acc 0 PREVPOS ! contents
BEGIN status bufs setpos KEY handle UNTIL
0 0x08 RAM+ ! 19 aty ;