mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-02 02:30:54 +11:00
Compare commits
3 Commits
c16c5c98ce
...
bc951a5ff1
Author | SHA1 | Date | |
---|---|---|---|
|
bc951a5ff1 | ||
|
8f0e51a21c | ||
|
6a6c59300e |
4
blk/101
4
blk/101
@ -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
2
blk/102
Normal file
@ -0,0 +1,2 @@
|
||||
X ( n -- ): Delete X chars after cursor and place in IBUF.
|
||||
E: Run X with n = length of FBUF.
|
2
blk/112
2
blk/112
@ -8,4 +8,4 @@
|
||||
SWAP 0 FILL
|
||||
EDPOS @ 64 / _pln ;
|
||||
: E FBUF _blen X ;
|
||||
|
||||
: Y FBUF _blen icpy ;
|
||||
|
2
blk/121
2
blk/121
@ -13,4 +13,4 @@ saved beforehand.
|
||||
|
||||
'[' and ']' advances the selected block by "modifier".
|
||||
|
||||
';' resets the modifier. 'q' quits. (cont.)
|
||||
(cont.)
|
||||
|
8
blk/122
8
blk/122
@ -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.)
|
||||
|
3
blk/126
3
blk/126
@ -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 ;
|
||||
|
8
blk/128
8
blk/128
@ -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! ;
|
||||
|
||||
|
3
blk/130
3
blk/130
@ -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 ;
|
||||
|
4
blk/131
4
blk/131
@ -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 ;
|
||||
|
Loading…
Reference in New Issue
Block a user