| Deutsch English Français Italiano |
|
<nnd$0207769a$4fbaef2b@b8861b2ed6b4e8e5> View for Bookmarking (what is this?) Look up another Usenet article |
Newsgroups: comp.lang.forth References: <v957nr$jq4q$2@dont-email.me> <v9bdpm$2sbsi$1@dont-email.me> <nnd$37164d96$3acc3df6@43c3aecde4ca6b05> <v9gc9i$1nqu$1@dont-email.me> From: albert@spenarnc.xs4all.nl Subject: Re: Juggling system-compilation items X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: albert@cherry.(none) (albert) Message-ID: <nnd$0207769a$4fbaef2b@b8861b2ed6b4e8e5> Organization: KPN B.V. Date: Wed, 14 Aug 2024 12:58:16 +0200 Path: ...!weretis.net!feeder9.news.weretis.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail Lines: 44 Injection-Date: Wed, 14 Aug 2024 12:58:16 +0200 Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com" Bytes: 2929 In article <v9gc9i$1nqu$1@dont-email.me>, Gerry Jackson <do-not-use@swldwa.uk> wrote: >On 12/08/2024 10:45, albert@spenarnc.xs4all.nl wrote: >> In article<v9bdpm$2sbsi$1@dont-email.me>, >> Gerry Jackson<do-not-use@swldwa.uk> wrote: >>> ISTM that using the data stack to hold the control stack is an >>> anachronism that was used in early Forth systems because of the limited >>> amount of memory available. I also think that the system should not get >>> in the way of user programs as putting control stack data on the data >>> stack certainly does. >> It alleviates restriction. Marcel Hendrix hated the restrictions of >> R> >R and added the socalled "system stack" S> >S that can be used >> over definitions. The disadvantage is of course that there are more >> regions of memory that you have to keep track of. >> I think that added complexity is a more important consideration as >> memory usage. The more stacks you have and the more stack items >> you keep in registers, the more difficult e.g. task switching becomes. > >As use of a control stack is during compilation, speed is not too >important so why would register(s) be used for it? The control stack pointer can be a user variable, so the switching is automatic. 1) So you are right that it doesn't impose extra restrictions for task switching. Probably I was rationalizing that I hate making things more complicated. Having a separate control flow stack is a complication in itself, but it makes other things simpler. I have the example of restricting STATE to [ ] and INTERPRET. Marcel Hendrix has the example of passing data to a definition. There are probably more. 1) By swapping the user pointer, all user variables are switched. > >-- >Gerry > Groetjes Albert -- Don't praise the day before the evening. One swallow doesn't make spring. You must not say "hey" before you have crossed the bridge. Don't sell the hide of the bear until you shot it. Better one bird in the hand than ten in the air. First gain is a cat purring. - the Wise from Antrim -