1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 11:28:05 +11:00
collapseos/blk/357

12 lines
368 B
Plaintext
Raw Normal View History

2020-05-26 10:16:07 +10:00
: _ ( a+1 len -- n f )
2020-05-26 03:22:26 +10:00
OVER C@ ( a len c )
'-' = IF
1- SWAP 1+ SWAP ( a+1 len-1 ) _ 0 ROT ( f 0 n )
- SWAP EXIT ( 0-n f )
2020-05-26 03:22:26 +10:00
THEN ( a len )
0 SWAP ( len ) 0 DO ( a r )
OVER I + C@ ( a r c ) _pdacc ( a r f )
2020-05-26 10:16:07 +10:00
IF DROP 1- 0 UNLOOP EXIT THEN LOOP ( a r )
2020-05-26 03:22:26 +10:00
NIP 1 ;
2020-05-26 10:16:07 +10:00
: (parsed) ( a -- n f ) C@+ ( a+1 l ) _ ;