In article <2024Mar5.125837@mips.complang.tuwien.ac.at>,   
   Anton Ertl wrote:   
   >albert@spenarnc.xs4all.nl writes:   
   >>In article <2024Mar4.182409@mips.complang.tuwien.ac.at>   
   >>>My question is: Which Forth systems have a DO/?DO that pushes the   
   >>>address [at run-time to the return stack] that LOOP/+LOOP then jumps to?   
   >>   
   >>All the versions of ciforth MS/Linux/OSX 32/64 ARM/86 do this.   
   >   
   >Thanks. AFAIK you started with fig-Forth that puts the loop-back   
   >address in the interpreted code. Why did you change this approach?   
      
   The address that I push is the address after the loop.   
   So LEAVE as well as LOOP discards only loop parameters and go NEXT.   
   (DO) is followed by a (FORWARD half jump, it doesn't jump over the   
   body but is resolved by a FORWARD) , so it knows what   
   address to push.   
   If I remember correctly the original FIG LEAVE was not ISO, so this   
   had to be fixed anyway. LEAVE and UNLOOP are almost synonyms.   
   Simple manipulation of the return stack are preferred in view of my   
   optimiser that can push return stack items into oblivion (registers).   
      
   DO LOOP in FIG / ISO say FORTH is a mess anyway. The idea that   
   signed/unsigned numbers can be handled uniformly was cute at the   
   time, when you could not spare 10 bytes. In the 50 years no novice   
   even dared to try negative indices or negative increments.   
      
   >- anton   
      
   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 -   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|