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


Groups > comp.lang.forth > #22752

Re: The most elegant Forth interpreter.

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.forth
Subject Re: The most elegant Forth interpreter.
Date 2013-05-17 22:32 -0700
Organization Nightsong/Fort GNOX
Message-ID <7x4ne097ko.fsf@ruckus.brouhaha.com> (permalink)
References (6 earlier) <klmom1$ln5$1@speranza.aioe.org> <r5-dncwRSu0GZ-PMnZ2dnUVZ_tOdnZ2d@supernews.com> <f5b9ffec-71bb-4ef9-ad67-9e18e9803fa8@googlegroups.com> <7xhai111wk.fsf@ruckus.brouhaha.com> <c2ddf12d-0459-49d9-b3e4-c4dec88e9f24@googlegroups.com>

Show all headers | View raw


visualforth@rocketmail.com writes:
> That's the trick I was looking for. I didn't find a solution to
> address more than 256 words only using one byte. That means, all
> application words will need 2 Bytes. That's interesting for
> portability, has some time penalty.

Maybe you could assign 64 of the 1-byte codes to system words and leave
the other 64 for user words.  Or steal another bit or two, e.g.  have
192 1-byte codes (0x00 - 0xBF) so that 11 in the upper two bits means
the next 14 bits are the address, giving you 16k addressible, etc.

But, the extra program space needed to deal with this complexity and
have the lookup tables from byte tokens to addresses might not be worth
it in the launchpad.

> On Monday, April 29, 2013 6:56:27 PM UTC-4, Andrew Haley wrote:
>> I once ran out of code space in a microcontroller application....
> Paul, you are writing now "I don't know if the approach is that useful
> for 4e4th given ... the quite limited memory of the 430/2553
> processor" That's some kind of contradiction, I guess.

I'm imagining Andrew was using a somewhat bigger processor than the
Launchpad's, but I don't know.  You lose some space for the interpreter
itself, but then gain it back through the more compact instruction
coding, if the program is big enough.  

I think Brad Rodriguez has some pages someplace explaining token
threading.

>> ARM boards that would make better targets, from Freescale and STM 
> You are welcome to join us and offer a free Forth for Education for
> these boards.

No problem, I'll add it to my very long list of things to do in my
nonexistent free time. ;-)

> The 4E4th-IDE.exe - see http://www.4e4th-IDE.org - including Flasher,
> Editor and Cross-Assembler only needs 1MB on disk, much less than
> other IDEs (IAR needs 1GB on disk).

Sounds nice but it's Windows-only?  I'd want something like this to run
in completely FOSS systems.

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


Thread

Re: The most elegant Forth interpreter. dirk.bruehl@usa.net - 2013-05-16 18:24 -0700
  Re: The most elegant Forth interpreter. Paul Rubin <no.email@nospam.invalid> - 2013-05-17 19:02 -0700
    Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-17 21:33 -0700
      Re: The most elegant Forth interpreter. Paul Rubin <no.email@nospam.invalid> - 2013-05-17 22:32 -0700
        Re: The most elegant Forth interpreter. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 07:50 -0500
          Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-18 10:56 -0700
            Re: The most elegant Forth interpreter. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 13:38 -0500
              Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-18 12:49 -0700
                Re: The most elegant Forth interpreter. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-19 04:12 -0500
                Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-19 13:58 -0700
                Re: The most elegant Forth interpreter. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-20 04:01 -0500
        Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-18 10:47 -0700
          Re: The most elegant Forth interpreter. Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 01:23 +0200
        Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-18 18:44 -0700
          Re: The most elegant Forth interpreter. Paul Rubin <no.email@nospam.invalid> - 2013-05-19 20:41 -0700
            Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-19 23:25 -0700
      Re: The most elegant Forth interpreter. "Bill Leary" <Bill_Leary@msn.com> - 2013-05-18 06:15 -0400
        Re: The most elegant Forth interpreter. visualforth@rocketmail.com - 2013-05-18 10:34 -0700
  Re: The most elegant Forth interpreter. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 05:30 -0500

csiph-web