home bbs files messages ]

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,734 of 117,927   
   Anton Ertl to Jan Coombs   
   Re: Avoid treating the stack as an array   
   13 Sep 24 17:59:27   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   Jan Coombs  writes:   
   >Absolutely.  As Chucks prime target of interest (hardware) uses LIFO   
   >registers for stacks, only the top top one, or so, R stack items could   
   >be used for restricted local storage (which is also common practice).   
   >   
   >I accept that locals are useful, and would like to see hardware stack   
   >engine implementations that support this better while retaining the   
   >performance advantage of a stack cache implemented as LIFO registers   
   >rather than in RAM.   
      
   AFAIK Chuck Moore implements the stack as SRAM indexed with his stack   
   pointer; maybe the stack pointer is a rotating shift register with   
   only one bit set, don't remember.   
      
   He also uses an A register in addition to R and the data TOS last I   
   looked.  So much for Chuck Moore denouncing registers.  When he   
   introduced A, some people played with the idea to add A and possibly   
   more registers to Forth.   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2024: https://euro.theforth.net   
      
   --- 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