S-basic [video]

My new pet project: a full features basic interpreter. I’ve got the console window all done with a nice fixed width font and load of features.

Now what special commands do we want to see for NETMF? All the QBASIC file and graphics commands will be ported (yes welcome back classic DOS games) and I’ll put in some basic pin stuff. What else?

can you make it look like a c64? I’m going thru a retro time at the moment.

@ willgeorge - Don’t know if it would help with BASIC syntax, but you might want to put the code between code tags

I respect your intentions here, but it’s been done, cheaper and faster than NETMF can do it: ARM stamp - LPC11U37 | Embedded System Design and Tools from Coridium

My intention is not to discourage you in your project, I just want you to be aware of where your competition is.

Also, the PICAXE family is highly relevant in this space.

@ Skewworks

That is awesome. Which board is this on ?

@ Godefroi

Have you used the Coridium or the PICAXE before? What will it take to add a LCD and program a console that allow me to enter BASIC syntax using a touch pad to one of these devices?

@ Skewworks

I am thinking G mainboard + VGA module + USB keyboard + S-BASIC - brings back memories of my first encounter with computers (Texas Systems) many years ago.

I’ve got a PICAXE that I’m using to teach my 9-year-olds a bit of programming with. They’re EXTREMELY easy to use, and can be programmed either with BASIC or flowcharts. The chips are cheap ($2.95 from SparkFun for the 8-pin version, $3.95 I think for the 14-pin, and goes all the way up to 40 pins), and can be run at high speeds. They can also be used in extremely low power modes, as in, running years from a few AA batteries, if they’re not doing much.

I’ve never used the Coridium devices, but they’re very interesting. Cheap, extremely fast (at least compared to the PICAXEs), and still free tools.

I doubt that either could take in BASIC code from anywhere but the serial programmer, but given a pair of chips, one could probably be set up to program the other. One nice thing is that the 14-pin and larger PICAXE chips have built-in PS/2 keyboard interfaces. They also have “touch” pins, but I haven’t played with that at all.

I completely disagree here. Having BASIC on NETMF is brilliant. You can’t compare PIXACE, basic stamp, and probably any other BASIC-device to what NETMF devices offer. Yes you will not buy Hydra to just run BASIC, but having another option on NETMF is great. An educator, for example, can use the same board to teach BASIC, C and C#. A commercial user can let his customers load small BASIC scripts to handle little tasks. Do you want a real application example? Possibilities are endless in my view.

There is no competition here. NETMF is not replacing/competing with PICAXE, arduino or any other offer on the market. NETMF has its own great place between little things (PICAXE) and linux/winCE.

@ skewworks - please go for it. We look forward to seeing it.

Gus, an educator with limited resources would have to be certifiably insane to purchase a Hydra and a screen to use BASIC to teach microcontrollers. A PICAXE can be had for $2.95, less in volume. The software is very good, and free. The support resources are extensive. There’s no contest, from a teach-people-to-program-microcontrollers-in-basic point of view.

You created a basic interpreter at one point, and you referred to it as a dead end (essentially; I can’t dig up the post now). Why the sudden interest now, out of curiosity?

Again, Skewworks, I’m not trying to discourage you here. I think it’s a great idea.

Like I said, no one would buy a NETMF device to program it in BASIC only. An educator who already have NETMF already teaching C# and VB using them, can now use BASIC as another option to show some history in programming or show the basics of programming.

What I did was very partial and I didn’t have time to complete it but I was always interested in seeing it complete.

None of this matters… It would just be really cool to be able to write programs on a Gadgeteer tablet w/o any PC required especially if you had a way to be able to interact with LEDs, buzzers, etc. that might be attached. Now if only the BT module would connect to a BT keyboard… Go for it!

@ Brett - Should be doable. :slight_smile:

@ willgeorge - YES! I remember that old code; I’m definitely going to run that as a test :smiley: :smiley:

@ godefroi - I’m just doing this for me. I haven’t had a pet project for just myself in awhile. If no one else ever uses it I’ll still be happy playing my games from my childhood on it. :slight_smile:

@ Gus - Hadn’t even thought about educators, it’ll all be open source and posted up so anyone that wants it can have it.

@ Rajesh - Currently I’m running it on GameSlate hardware (Hydra, 2 buttons, 1 joystick, T35 display)

If you complete it then I promise you a gift, so get to it :slight_smile:

@ Gus - Sweet, fun side project and a gift! It’ll take awhile since I want to do a full implementation + extra methods for NETMF (like QBASIC added DOS specific methods) but it’ll get done. I’ve already got a good start, we’ll see if I can manage a video today or over the weekend.

Make sure there is an easy way to extend the commands.

Like if I want to send a CAN massage from the script. I should be able to.

Making great progress! SBASIC already removes comments, cleans up blank lines and runs a handful of basic commands. The following code loads, parses and executes in 55ms. Super simple Hello World but it’s a start. :slight_smile:

' HelloWorld.bas
' 2012 Thomas W. Holtquist

SCREEN 27, 161, 226
TEXT 255,255,255
CLS
PRINT "Hello World!"

The first 3 lines are completely removed.
The last 4 lines are each checked for line numbers.

Screen sets the background color.
Text sets the foreground color
CLS clears the screen
PRINT is obvious. :wink:

I’ll put up a video after I have a few more impressive things up and running.

Very cool. It’s been a very long time since I’ve written some BASIC. :slight_smile:

Here’s the first video. I know the commentary is horrid, but it’s very late at night and I’m exhausted. Did the video in between all the other stuff I have to get done before sleep.

g6FOMrXCb0I

5 Likes

@ Skewworks - this is very cool, I think this is a great idea to be able to develop on the device without needing a PC, just a keyboard and screen.

Don’t even need a keyboard. S-BASIC will have Tinkr’s onscreen keyboard as well as GameSlate’s scroll to select text editor. :wink: