| Deutsch English Français Italiano |
|
<62e658efe2da542c8de270bd1624b4fa5ad9034a@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: Back & Forth - Co-routines Date: Mon, 24 Mar 2025 12:50:58 +1100 Organization: i2pn2 (i2pn.org) Message-ID: <62e658efe2da542c8de270bd1624b4fa5ad9034a@i2pn2.org> References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734> <49736c0ec0e34ca5d67f4e0d6e8cbe2a080e38ab@i2pn2.org> <vnkvvq$2a5o$1@dont-email.me> <nnd$14fbaf4d$1e462a10@60e007c2d8488e4d> <vnq10p$162l3$1@dont-email.me> <vrmm9l$994t$1@dont-email.me> <4dc5d804684a9e6fe364ea7cf288322de5b96629@i2pn2.org> <nnd$68f05139$09328b99@aec5a078c289c9c6> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 24 Mar 2025 01:50:59 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="1483639"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird X-Spam-Checker-Version: SpamAssassin 4.0.0 Content-Language: en-GB In-Reply-To: <nnd$68f05139$09328b99@aec5a078c289c9c6> Bytes: 3079 Lines: 39 On 23/03/2025 10:25 pm, Hans Bezemer wrote: > On 23-03-2025 04:03, dxf wrote: >> On 23/03/2025 2:51 am, sjack wrote: >>> Ruvim <ruvim.pinka@gmail.com> wrote: >>> >>>> An artificial example: >>> >>> While wondering down roads less taken, I took a path where >>> bacForth CUT: and -CUT were used in lieu of CATCH THROW . >> >> Does anyone have a reference/details for this anywhere as I can't seem to >> find anything? >> >> A possibly useful hit but the doc is locked away: >> >> https://doi.org/10.1145/165628.165637 > > Found it! Try this one: https://www.complang.tuwien.ac.at/anton/euroforth/ef96/gassanenko96b.txt > > But I'm gonna spoil it for you: BacForth has an extra "L" stack. CUT: and -CUT use it. You might wanna use this one if you REALLY want it: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/stack.4th > > It's code for a light weight stack. BTW, TRACKING is missing as well. It might have to do with this one? https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/backtrak.4th > > : CUT: \ mark the beginning of the fragment to cut > R> RP@ >L \ copy r-stack top addr. to L-stack > BACK LDROP TRACKING \ delete this mark when backtracking > >R ; > : -CUT R> L> RP! >R ; \ delete return points upto the marked addr. > : -NOCUT \ remove the mark, but not the return points > R> > L> RP@ - >R \ keep the mark as a relative address > BACK R> RP@ + >L TRACKING \ restore it when backtracking > >R ; Thank you (and sjack) for chasing down this one. More detail appears to be available in the SP-Forth sources directory: \devel\~profit\lib\bac4th.f A CP1251 to Unicode converter is here: https://convertcyrillic.com/#/convert