Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #21190
| Newsgroups | comp.lang.forth |
|---|---|
| Date | 2013-03-27 18:50 -0700 |
| References | <0770e496-c689-4cc2-8604-51b9587c187b@googlegroups.com> <KdydnbP57MRR-tHMnZ2dnUVZ_h2dnZ2d@supernews.com> |
| Message-ID | <f3aa84e4-492a-4bd6-b4d6-e21ff6fb8b45@w2g2000pbw.googlegroups.com> (permalink) |
| Subject | Re: Is there a way to define this portably in ANS Forth? |
| From | Hugh Aguilar <hughaguilar96@yahoo.com> |
On Mar 22, 7:16 am, Andrew Haley <andre...@littlepinkcloud.invalid> wrote: > The Beez <the.beez.spe...@gmail.com> wrote: > > A word which creates a named execution token that throws itself on > > the stack when executed, as if it were defined like this: > > > :noname + ; constant plus > > > <word> plus + ; > > > Just wondering. I'm not getting the right ideas right now :-( > > variable poo > > : ; postpone ; > poo @ if poo @ ! 0 poo ! then ; immediate > > : bleep create here poo ! 0 , does> @ ; > > : <word> bleep :noname ; > > <word> plus + ; > > 1 2 plus execute ok > . 3 ok > > Andrew. This assumes that HERE provides what will be the xt of the next colon word compiled. That may be true in some Forths, but it is definitely "unlawful carnal knowledge." We don't even define what the xt (execution token) is --- it is not necessarily the cfa, as was true in Forth-83. Some Forths have the headers in front of the code, and some have them separate. On modern processors, you generally want them separate --- this way your code is all adjacent and there will be less cache-thrashing. I still say there is no way to solve this problem in ANS-Forth.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Is there a way to define this portably in ANS Forth? The Beez <the.beez.speaks@gmail.com> - 2013-03-22 05:34 -0700
Re: Is there a way to define this portably in ANS Forth? Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-22 06:12 -0700
Re: Is there a way to define this portably in ANS Forth? Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-22 15:59 +0100
Re: Is there a way to define this portably in ANS Forth? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-03-22 21:53 -0700
Re: Is there a way to define this portably in ANS Forth? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-03-23 02:35 -0400
Re: Is there a way to define this portably in ANS Forth? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-23 05:37 -0500
Re: Is there a way to define this portably in ANS Forth? The Beez <the.beez.speaks@gmail.com> - 2013-03-23 04:08 -0700
Re: Is there a way to define this portably in ANS Forth? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-22 09:16 -0500
Re: Is there a way to define this portably in ANS Forth? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-03-27 18:50 -0700
Re: Is there a way to define this portably in ANS Forth? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-28 04:13 -0500
Re: Is there a way to define this portably in ANS Forth? Alex McDonald <blog@rivadpm.com> - 2013-03-28 06:54 -0700
Re: Is there a way to define this portably in ANS Forth? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-28 15:36 +0000
Re: Is there a way to define this portably in ANS Forth? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-28 16:19 -0500
Re: Is there a way to define this portably in ANS Forth? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-03-28 20:49 -0700
Re: Is there a way to define this portably in ANS Forth? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-29 04:25 -0500
Re: Is there a way to define this portably in ANS Forth? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-22 14:41 +0000
csiph-web