Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,683 of 117,927    |
|    albert@spenarnc.xs4all.nl to do-not-use@swldwa.uk    |
|    Re: Juggling system-compilation items    |
|    12 Aug 24 11:45:39    |
   
   In article ,   
   Gerry Jackson 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.   
   >   
   >Therefore I developed my system (for desktop systems only) with a   
   >separate control flow stack. It doesn't stop checking for unbalanced   
   >stack errors. As it is only used when compiling speed isn't important it   
   >can be a linked list implementation discarded at runtime. It allows data   
   >to be passed into or out of colon definitions or other control   
   >structures without considering the control stack unless you are trying   
   >to write portable software.   
   >   
   >So in your definition above the use of DEPTH, N>R etc is unnecessary as   
   > DEPTH >R : DEPTH R> -   
   >returns 0 for my system. CONST works.   
   >   
   >--   
   >Gerry   
   >   
   --   
   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 -   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca