Bootstrapping Forth on JVM, .NET CLR, etc.

forth

    Sponsored Links

    Next

  • 1. Documetation and Forth in Aerospace ( Day 30 coding in Forth
    m-coughlin wrote: > While attending an astrophysics colloquium on gamma ray > bursts last year, John Doty's name leaped out at me when the > speaker listed all his collaborators. Yikes! Sounds dangerous! I'll have to warn folks to keep it on a leash ;-) > > What use has been made with Forth in the development of > spacecraft at MIT lately or anywhere else? Very little in my area. The Chandra SIM has a motor controller programmed in Forth, but that didn't help Forth's declining image at all. It failed in the first integrated systems test, and it turned out that the contractor done no revision or configuration control, so they neither knew which version of the code should have been in the ROM, nor did they know what was actually in the ROM. Idiots. I'm developing a test setup for the next generation of x-ray CCD detectors here in Colorado: once I deliver it to MIT there will be a few users of my LSE64 dialect there (whether they like it or not :-). > Has any Forth code > for these systems been published that follows the previously > recommended good commenting practice? I think code is easier to > read when the comments and code are interspersed and I would > like to see a counter example. Not that I know of. -jpd
  • 2. FORTH driver for NEC USB UF000x floppy drive for inspiron 600m laptop
    Hello people, I'm having a little problem with starting on the creation of my driver. I recently wrote a standalone FORTH system for my laptop. It will be self contained once i'm able to write to mass storage. The next step is naturally to be able to read and write to either the hard drive or the floppy drive. I have a DELL inspiron 600m laptop. The floppy drive is a modular unit which can be inserted in a compartment on the right side of the laptop. And from what I can see, the modular unit connects through USB. I'm guessing i'll have to implement USB interfacing first to be able to read and write to my floppy disk. In any case, does anybody have any advice on where and how to start or where to find information that could get me started? I looked around on the net, but information concerning all this is very sparse. My other option is looking through linux code trying to figure out USB interfacing code, floppy driver, etc. ( This is my last option and probably the one I'll fall back to if I can't find anything better ). Another option is using the BIOS after switching back from protected mode to real mode addressing but thats ugly. I'd really rather not have to go through BIOS nor through switching back to real mode. Regards sonelock
  • 3. STOIC (was Day 30 coding in Forth)
    John Doty wrote: >> Why is a postfix colon "as it should be"? > > Well, in the STOIC world, we've always done it that way :-). We think > it's a bit more readable. Besides, Jon Sachs and Bob Goeke liked it > that way, and my client likes Bob's dialect. First question: Is there a modern implementation of STOIC available somewhere and/or a language reference for STOIC? And useful resources online you would recommend? Second question/comment: Based on your code example, my guess is that the following would be a STOIC definition of a word to return the square of a number: square : dup * My guess is that when STOIC finds a word not in the dictionary ("square") it is stored in some temporary place and the address is pushed onto the stack. My guess is that colon expects to find the address of a string on the stack and then switches to compile mode. Your code examples didn't include a word like semicolon to end the definitions-- what is the mechanism used to switch STOIC out of compile mode? STOIC sounds interesting-- in what other ways is the language "string oriented?"

Bootstrapping Forth on JVM, .NET CLR, etc.

Postby joel reymont » Tue, 07 Aug 2007 14:38:01 GMT

Folks,

Suppose I wanted to bootstrap a Forth on a JVM, .NET CLR or another
existing VM.

Where would I start?

I'm learning Forth on a Mac (gForth) and don't want to use Windows.

My goal is to create a network link from my Mac to the target VM for
interactive development with cross-compilation and debugging happening
locally.

    Thanks, Joel


Re: Bootstrapping Forth on JVM, .NET CLR, etc.

Postby joel reymont » Tue, 07 Aug 2007 15:53:42 GMT

To be more precise... Suppose I started up gforth and I'm at the
interpreter prompt.

I want EXECUTE to generate the appropriate bytecode and run it on the
linked VM.

How do I make sure that EXECUTE is not the one that gforth supplies?

Do I hack at the gforth source code to build the cross-compiled Forth
and if so then is gforth the right Forth to start with?

I see no reason to re-implement the "outer interpreter" (right
expression?) and would like to let gforth parse my Forth code. I can't
envision how I would replace the code generation part, though.

    Thanks, Joel



Re: Bootstrapping Forth on JVM, .NET CLR, etc.

Postby Dmitry Ponyatov » Fri, 10 Aug 2007 03:01:27 GMT

You can use your own byte-code interpreter (a.k.a. inner interpreter =
engine = virtual machine) written in Java/C#, and cross-compiler
written in FORTH which generates byte-code from Forth-like language


Re: Bootstrapping Forth on JVM, .NET CLR, etc.

Postby Dmitry Ponyatov » Fri, 10 Aug 2007 03:04:52 GMT

at  http://www.**--****.com/ 
build upon this principle -- simple virtual forth machine in C with
some C++ elements and cross-compiler for SP-FORTH (I still now
understand vocabularies and use lower-cased words for FVM commands and
some non-standard language elements like { } var const buffer)


Similar Threads:

1.JVM vs CLR

2.Micro Focus COBOL runtime, /clr:pure, etc.

Pete raised this issue in another thread, and coincidentally I ran
smack up against it yesterday.

A .NET application compiled using the Micro Focus Net Express add-in
for Visual Studio will not run on a system which lacks the Micro Focus
COBOL runtime DLLs. I infer from the reference to accountants, that
the cost per seat to license the runtime is high. This rules out
redistribution on my part.

Interested developers could just download and install the same free
tools as I've already used to create my non-commercial project. I've
posted instructions on the Barbarian's CodePlex page, which explain
how to acquire and install these tools: Net Express 5.1 Personal
Edition, and the Visual Studio Shell which is its minimal requirement
for installation.

Granted, nobody should do this while on the clock. My application is a
toy.

Tell me, though, does the Micro Focus COBOL compiler have any command
line option similar to /crl:pure? This compiler option for Visual C++
2008 generates assemblies which run with nothing more than the .NET
runtime.

One last technical question. When working with other languages, the
command line arguments for the compiler are displayed in Visual
Studio's project properties. Does the Micro Focus add-in provide this
feature somewhere?

If I've violated the Net Express Personal Edition license agreement by
releasing a Micro Focus-dependent EXE to CodePlex, somebody please
tell me, so I can kill that project now.

Thanks.

 - Matt Fisher

3.a tutorial on bootstrapping forth?

For a while now I've been trying to find a good tutorial on implementing a
forth system from scratch.  I haven't found one yet so I decided to ask here
and see if anybody knows of one.

From my research I've learned about the inner/outer interpreters.  I've even
heard that some people have written extremely basic forth compilers in
assembly that support only a handful of words (e.g. get/set a byte, colon,
semicolon and a few others) and then they "cross-compile" forth code for
the two interpreters into full featured Forth system.

Does anybody know what the minimal set of words would be for the
"cross-compile" bootstrapping method?  Does anybody know of forth source for
an inner and outer interpeter combo?

Thanks,
Dave



4.Forth bootstrapping framework - Bootforth

5.Bootstrapping a Forth in 40 lines of Lua code

6. Cleaning up ANS Forth variables, values etc

7. Fw: Using Forth to send a windows message to a MS application (spell checking etc)

8. cat-v.org FORTH v GO plan9 etc



Return to forth

 

Who is online

Users browsing this forum: No registered users and 23 guest