A BASIC Interpreter For The Raspberry Pi Pico

It’s pretty easy to program the Raspberry Pi Pico in Python, or you can use C or C++ if you so desire. However, if you fancy the easy language of yesteryear, you might like PiccoloBASIC from [Gary Sims].

Putting it simply, piccoloBASIC is a BASIC interpreter that runs on the Raspberry Pi Pico. It features all the good bits of BASIC such as GOTO and GOSUB commands, that fancier languages kind of look down upon. It’s also got enough built-in routines to handle regular programming life, like sleeps, delays, a basic pseudorandom number source, trigonometric functions, and the ability to deal with floating point numbers. As far as microcontroller tasks go, it’s got rudimentary support for talking to GPIOs right now via the pinon and pinoff commands. However, it’s probably not the way to go if you want to bit-bang an SD card to within an inch of its speed rating.

Down the road, [Gary] hopes to add support for features like the Pico’s I2C, SPI, and PIO hardware, along with networking protocols and Bluetooth. PEEK and POKE are also hopefully on the way for those that like to fiddle with memory directly.

Meanwhile, if you’re looking for a different yet similar take, explore the port of MMBasic to the Pico platform. Video after the break.

Continue reading “A BASIC Interpreter For The Raspberry Pi Pico”

Microsoft Releases The Source Code You Wanted Almost 30 Years Ago

In the late 1970s and early 1980s, if you had a personal computer there was a fair chance it either booted into some version of Microsoft Basic or you could load and run Basic. There were other versions, of course, especially for very small computers, but the gold standard for home computer Basic was Microsoft’s version, known then as GW-Basic. Now you can get the once-coveted Microsoft Basic source code for the 8086/8088 directly from Microsoft in the state you would have found it in 1983. They put up a read only GW-BASIC repository, presumably to stop a flood of feature requests for GPU acceleration.

You might wonder why they would do this? It is certainly educational, especially if you are interested in assembly language. For historical reasons, you might want to get a copy you could modify, too, for your latest retrocomputer project.

There are a few tidbits of interest. Some of the source is marked that it was translated. Apparently, Microsoft had a master implementation for some processor — real or imagined — and could translate from that code to 8088, Z-80, 6502, or any other processor they wanted to target.

From what we understand, GW-Basic was identical to IBM’s BASICA, but didn’t require certain IBM PC ROMs to operate. Of course, BASICA, itself, came from MBASIC, Microsoft’s CP/M language that originated with Altair Basic. A long lineage that influenced personal computers for many years. On a side note, there’s debate on what the GW stands for. Gee-Whiz is a popular vote, but it could stand for ‘Gates, William’, Greg Whitten (an early Microsoft employee), or Gates-Whitten. The source code doesn’t appear to answer that question.

We did enjoy the 1975 copyright message, though:

ORIGINALLY WRITTEN ON THE PDP-10 FROM
FEBRUARY 9 TO APRIL 9 1975

BILL GATES WROTE A LOT OF STUFF.
PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.
MONTE DAVIDOFF WROTE THE MATH PACKAGE (F4I.MAC).

It wasn’t long ago that Microsoft released some old versions of MSDOS. If you have the urge to write some Basic, you might pass on GW-Basic and try QB64, instead.

GW-Basic Disk and Manual photo by [Palatinatian] CC-SA-4.0.

Supercon Badge Hardware Hacking: Here’s What To Bring

Hackaday Superconference is just a week away (precious few tickets remain), a celebration of all things Hackaday, which naturally includes creative projects making the most of their hardware. Every attendee gets a platform for hacking in the form of the conference badge.

To make the most of your badge hacking fun, plan ahead so you will have the extra components and the tools you need. At the most basic, bring along a serial to USB cable and a PIC programmer. These are common and if you don’t own them, ask around and you will likely be able to borrow them. Now is also the time to put in a parts order for any components you want to use but don’t have on hand!

The badge is hackable without any extras, but it’s designed for adding hardware and hacking the firmware. We’re excited to see what you can do with it. We gave an overview of this retro themed pocket computer a few days ago, today we’re inviting you to exploit its potential for your hardware hacks.

Continue reading “Supercon Badge Hardware Hacking: Here’s What To Bring”

Flappy Bird Is The New “Does It Run Doom?”

Back in 2014 [Johan] decided to celebrate BASIC’s 30 50 year anniversary by writing his own BASIC interpreter. Now, a few years later, he says he feels he has hit a certain milestone: he can play Flappy Bird, written in his own version of BASIC, running on his own home-built computer, the BASIC-1.

Inside the BASIC-1 is an Atmel XMega128A4, a keyboard from a broken Commodore 64, a joystick port, a serial to TV out adapter, and an SD card adapter for program storage. An attractively laser-cut enclosure with kerf bends houses the keyboard and hardware. The BASIC-1 boots into BASIC just like many of its home computer counterparts from the 80s.

Continue reading “Flappy Bird Is The New “Does It Run Doom?””

Arduino BASIC Interpreter Using LCD, Keyboard, And SD

This Arduino BASIC interpreter will make a really fun one-day project if you’ve already got the parts on hand. [Usmar A. Padow] put together an Arduino Uno, SD card, four line character LCD, and PS/2 keyboard. but he’s also included alternative options to go without an LCD screen by using a computer terminal, or without the SD card by using only the Uno’s RAM. As you can see in his demo after the break, this simple input/output is all you need to experiment with some ancient computing.

It’s hard for us to watch this and not think back to an orange or green monochrome display. Just like decades past, this implementation of BASIC has you start each line of code with a line number, and doesn’t allow for character editing once the line has been input. The example programs that [Usmar] shows off are simple to understand but cover enough to get you started if you’ve never worked with BASIC before.

Last August we saw another hack which ported Tiny BASIC to the Arduino. You may want to take a gander at that one as well.

Continue reading “Arduino BASIC Interpreter Using LCD, Keyboard, And SD”

BASIC Programming On An Arduino

[Mike] sent in a project he’s been working on – a port of a BASIC interpreter that fits on an Arduino. The code is meant to be a faithful port of Tiny BASIC for the 68000, and true to Tiny BASIC form, it fits in the very limited RAM of the Arduino.

True to Tiny BASIC’s assembler roots, [Mike]’s C port makes extensive use of the “infinitely-abusable” goto statement. Kernighan and Ritchie said themselves, “code involving a goto can alway be written without one” but [Mike] found that using goto left a lot more room available for BASIC code. The BASIC interpreter eats up around 600 bytes in the Arduino RAM, leaving about 1.4 kB for BASIC code. Not much, but more than the lowest-end BASIC Stamp.

[Mike] says he started this project to see how ‘old bearded ones’ conjured up so many impressive programs with a few kB of RAM. Tiny BASIC was originally conceived for the Altair 8800 that shipped with 256 bytes of RAM stock, so it seemed like a perfect fit. Right now, all we know is we’ll be spending the weekend digging through our copies of Dr. Dobb’s Journal.