Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #25982

Re: Execution tokens for return stack manipulation

From "Rod Pemberton" <dont_use_email@nohavenotit.com>
Newsgroups comp.lang.forth
Subject Re: Execution tokens for return stack manipulation
Date 2013-09-23 18:09 -0400
Organization Aioe.org NNTP Server
Message-ID <op.w3vw6ggz0e5s1z@localhost> (permalink)
References <l1q4vi$jdi$1@oravannahka.helsinki.fi>

Show all headers | View raw


On Mon, 23 Sep 2013 15:32:02 -0400, Lauri Alanko <la@iki.fi> wrote:

> Are execution tokens for primitive return stack operations (r>, r@, >r
> etc.) supposed to be usable? I.e. is this legal?
>
> : foo >r ['] r> execute . ;
> 42 foo
>
> On gforth this outputs 42, but I'm wondering if this is something that
> can be commonly relied on.
>
> I remember being a while ago concerned that supporting this would
> complicate the implementation of primitive execution tokens, but then
> I found out that the above situation doesn't actually need to be
> supported. However, now that I scan the Forth 200x draft, I cannot
> find where I got that idea from.
>
> Could someone clarify what the standard (and common practice)
> dictates? Thanks.
>


Results for a few Windows Forths:

gForth (0.7.0 ITC)
   works

bigForth (1.4.0)
   fails

Win32Forth (6.14.02)
   works


Results for a few old DOS Forths:

eForth (6 flavors)
  eForth (v1.0)
   doesn't recognize [']
   works when ['] is defined
  eForth (v1.01 86v2)
   doesn't recognize [']
   works when ['] is defined
  eForth (v1.01 86v1)
   doesn't recognize [']
   works when ['] is defined
  eForth (ITC16i)
   works
  eForth (bFORTH 80x86 v1.02)
   works
  eForth (86eForth v2.2)
   doesn't recognize [']
   works when ['] is defined

CamelForth (v1.0)
  works

TCOM (2.50)
  accepts definition
  executes without failure
  doesn't emit value
  inccorectly complains about using EXECUTE in INTERPRET mode upon upon exit
  calling this a fail...

SPF (4.00 build 016)
  works

RetroForth
  doesn't recognize >R
  doesn't recognize R>
  doesn't recognize EXECUTE
  etc...
  unable to test

BB4WForth (0.38)
  works

ATLast
  works

This4th
  fails

8088 Fig-forth (1.0)
  doesn't recognize [']
  not sure how to define a working ['] for it...
  unable to test

F83 (2.1.0)
  works

ZimmerForth (8.111F)
  works

F-PC (3.60)
  works

MiniForth
  doesn't recognize [']
  doesn't recognize ' (tick)
  doesn't recognize [COMPILE]
  has no IMMEDIATE word but has functionality
  etc...
  unable to test

HTH,


Rod Pemberton

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Execution tokens for return stack manipulation Lauri Alanko <la@iki.fi> - 2013-09-23 19:32 +0000
  Re: Execution tokens for return stack manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-23 14:59 -0500
    Re: Execution tokens for return stack manipulation Lauri Alanko <la@iki.fi> - 2013-09-23 20:21 +0000
      Re: Execution tokens for return stack manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-23 15:53 -0500
    Re: Execution tokens for return stack manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2013-09-23 23:27 +0200
      Re: Execution tokens for return stack manipulation "Alex McDonald" <blog@rivadpm.com> - 2013-09-23 23:37 +0100
      Re: Execution tokens for return stack manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-24 06:52 -0500
        Re: Execution tokens for return stack manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-09-24 12:36 +0000
          Re: Execution tokens for return stack manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-24 12:10 -0500
            Re: Execution tokens for return stack manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2013-09-24 22:22 +0200
        Re: Execution tokens for return stack manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2013-09-24 16:14 +0200
          Re: Execution tokens for return stack manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-24 12:12 -0500
  Re: Execution tokens for return stack manipulation "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-23 18:09 -0400
  Re: Execution tokens for return stack manipulation "Elizabeth D. Rather" <erather@forth.com> - 2013-09-23 12:40 -1000
    Re: Execution tokens for return stack manipulation Lauri Alanko <la@iki.fi> - 2013-09-23 22:43 +0000
      Re: Execution tokens for return stack manipulation Spam@ControlQ.com - 2013-09-24 01:38 -0400

csiph-web