Pages: [1] 2 3 ... 5   Go Down
Author Topic: Is there a good Basic interpreter?  (Read 7126 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

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?

Thanks.
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26220
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got to ask - Why?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18732
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there a good Basic interpreter?

No.
Logged


Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've got to ask - Why?

I want to build a computer like the C64 including screen and keyboard. I want it to be completely programmable. Therefore I need a scripting language.
Logged


Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What's good is highly subjective.

Quote
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"?
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

De gustibus non disputandum est.

Good luck with your project. smiley


-br
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But as these sources evolve,

Life isn't supposed to be perfect.
Logged

East Anglia (UK)
Online Online
Faraday Member
**
Karma: 114
Posts: 4240
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26220
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is that somehow possible or does it sound ridiculous?
Yes on both counts.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1] 2 3 ... 5   Go Up
Jump to: