[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Naked LUA
- From: uwe@... (Valeriy E. Ushakov)
- Date: Tue, 27 Jul 2010 19:48:38 +0000 (UTC)
Zomirp Cila <email@example.com> wrote:
> I'm still evaluating others. Could any of you give me additional Forth
> directions? Google finds a lot of ports, compilers and so on.
> What sources would best for porting?
http://www.annexia.org/_file/jonesforth.s.txt - you will need to do
something like that for your target CPU.
I once decided to write my own tiny forth just to get a better grasp
of the internals. I used sh3 since that was the assembler I was most
fluent with at the time. The core of indirect threaded code
interpreter was just 32 bytes (for asm words and forth colon words).
On top of that you will need some asm words for manipulating stack and
doing basic arithmetic &co. More asm words for to be self hosted, or
use some other method to cross-compile your image on the host. From
there you can borrow forth code from any suitably licensed
Depending on how much niceties do you want your system to provide, you
can scale it down to just a couple of kilobytes.