BASIC for some beefy AVR chips

klBASIC is a BASIC interpreter written in C for AVR microcontrollers. [Karl Lunt] developed the project based on an assembly language BASIC interpreter for 68HC11 chips written by [Gordon Doughman]. The transition from assembly to C bulked up the code, so you’ll need a beefy AVR chip in order to store all of it.

The idea is that one AVR chip can run BASIC with just a serial monitor. But like this Arduino BASIC interpreter build, it would be a snap to run this with a keyboard and small LCD screen. We see binaries available for several different AVR devices including ATmega128, ATmega1284, and Xmega128. They range from 1.5k to 16k of program memory. We didn’t find a link to the source code (just these precompiled files) so we inquired with [Karl] to see if that is available. He’s reluctant to release the code because it’s “pretty much a mess” and doesn’t live up to his normal standards. If he codes for a living we can see how that may be embarrassing. If you’d like to lend a hand cleaning up the code, let him know by leaving a comment here and maybe he’ll release it for that purpose.

We find this interesting, but it’s tough to get excited about building one of our own. If this has inspired you, we’d love to hear some of your plans in the comments after the break. Perhaps we’d be prodded into another programming adventure based on your¬†enthusiasm.

Comments

  1. gnomad says:

    Is there any source code available for this?

  2. I’ve written a Forth-like language for the Arduino as well. The development environment runs on the Arduino itself, and can be executed even on Atmega168 ‘duinos. Source: https://github.com/lpereira/finf

  3. charliex says:
  4. soopergooman says:

    I dont know if its from coming here everyday and reading all the posts for the last 6 or 7 years, but I actually understood the function of the code as I read it. Hmmmmm

  5. Ray Moore says:

    I for one would love to see the source and play with it. I am working on building up a (mostly) solderless neuvo retro computer system with VGA, SD card, keyboard, mouse, and ethernet interfaces built from AVR chips and possibly an 8052 series chip for the fun of it. I have been looking for a basic interpreter to add into the system and one written in C that will fit on an atmega1284 would be perfect. Here’s hoping he releases the code soon!

  6. Coda says:

    I want to see the basic interpreter from the ZX Spectrum ported to AVR. Maybe can keep the tape loading interface? :)

  7. Ray Moore says:

    I have, barely, started working on converting the commodore 64 basic to AVR…hoping to do the editor too.

  8. Karl Lunt says:

    Ray (and others),

    I posted the source code for the KLBasic compiler/interpreter to my website. The post includes two file sets. One set contains the target-independent core files, the other set contains the source for the AVR ATmega ports, including the ‘mega1284p.

    The release also includes a long document with tips for getting started on your own ports.

    Ray, your C64 Basic port to AVR sounds cool. Please keep us posted.

    Karl

  9. yaronbaj says:

    i am not sure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,374 other followers