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 117,780 of 117,927   
   Anton Ertl to Bruce Axtens   
   Re: Writing a FORTH in QBE?   
   28 Nov 25 10:09:31   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   Bruce Axtens  writes:   
   >I've just become aware of QBE . Could one write   
   >a FORTH in it?   
      
   An interpreter written in QBE?  Should be possible.   
      
   Compiling Forth through QBE to machine code?  Here the problem is that   
   QBE (like some other intermediate languages) defines C-inspired   
   functions and imposes the resulting calling convention on the   
   languages compiling to it.  This is not ideal for all programming   
   languages, which is why LLVM has the option for other calling   
   conventions, but I don't see that for QBE.  So one option is to live   
   with the constraints of the given calling convention (but why compile   
   to QBE instead of C in that case?), another is to eschew functions,   
   calls, and returns, and implement everything in one function, with   
   calls implemented as push-and-jump, and returns implemented as   
   pull-and-indirect-jump.  Both are not ideal.   
      
   - 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 2025 CFP: http://www.euroforth.org/ef25/cfp.html   
   EuroForth 2025 registration: 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