Is there a good Basic interpreter?

What's good is highly subjective.

They can be easily compiled to the Arduino, but I was rather looking for a 'library' where you could you know..

How hard would it be for you to stripe out the "shell"?

I guess it shouldn't be so hard. But as these sources evolve, I would have to change the code over and over again in order to make the new version fit.

Bitlash might be a good fit for your application: http://bitlash.net

Bitlash is an iterpreter for a tiny language that runs entirely on the Arduino. It's easy to integrate into your Arduino application, and to extend the interpreter with functions you write in C and in the Bitlash language.

-br

I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z.

De gustibus non disputandum est.

Good luck with your project. :slight_smile:

-br

I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z.

You know, a reality check would be a good thing. Which Arduino are you using? Look at how much SRAM it has. The "code" to be interpreted has to fit in that space. Along with the interpreters variables.

Currently, I'm using the Mega 2560. But I already ordered a Due.

But as these sources evolve,

Life isn't supposed to be perfect.

DevilsChild:
I've seen bitlash before and to be honest, I don't like it. It has a weird syntax and only allows variables 27 from a-z.

27 variables from a-z. Clever !

Got another idea: What about an assembly compiler on the Arduino? Pass ASM code as string and get binary code as return and then execute it by setting the instruction pointer? Is that somehow possible or does it sound ridiculous?

Is that somehow possible or does it sound ridiculous?

Yes on both counts.

Okay... But how can I execute a set of instructions, and how can I compile assembly code into binary code?

how can I compile assembly code into binary code?

The gcc compiler is really good at that.

That still leaves the question on how to execute a set of binary code on the Arduino. I think you need to add the instruction pointer on the stack, then excecute the binary code and at the end of that code pop esi and jump to it, right? Though I haven't found any examples yet...
Also, is it possible to compile asm on the Arduino?

Hmmm

"...lightweight interpreter..." , "... sources evolving...", "... life perfecting ..."

Of course!

....+++---> brainf*ck

Oh. And this guy has already written the interpreter for atmega:

Cheers,
John

That still leaves the question on how to execute a set of binary code on the Arduino.

The bootloader allows you to do that.

I know, but I meant from within running code, like this:

void setup()
{
    char *binary = .....
    push esi
    execute(binary);
    pop esi
}

Forth might be a good option:
http://arduino.cc/forum/index.php/topic,8838.0.html

DevilsChild:
Got another idea: What about an assembly compiler on the Arduino? Pass ASM code as string and get binary code as return and then execute it by setting the instruction pointer? Is that somehow possible or does it sound ridiculous?

Not possible. On these processors (Harvard architecture) you can't execute code from RAM.

DevilsChild:
Got another idea: What about an assembly compiler on the Arduino? ....

Do you mean ON the Arduino or FOR the Arduino?