I'm looking for a Basic interpreter which can run on the Arduino. I've seen many such as TinyBasic, but the problem I always had is that they are not very generic. They can be easily compiled to the Arduino, but I was rather looking for a 'library' where you could you know... Pass the code as string and the library executes it? I don't necessarily need the shell that many interpreters provide. I can do this myself. But in order to be able to implement other things, some structured code is needed.
I hope you know what I mean. Does anyone know a good interpreter language (not necessarily Basic), which can be easily included?
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 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.
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.
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?
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?