TinyBasicLike: A Target-Independent BASIC Interpreter

In the long and winding history of BASIC, it’s sometimes hard to keep track of all the different variants and dialects. Some may still remember TinyBASIC, which was published in 1976 as Palo Alto Tiny BASIC by [Gordon Brandly]. Later, TinyBASIC was modified by a number of people including [Scott Lawrence] who created TinyBASIC Plus (TBP). Inspired by this, [Karl] figured he could improve on TBP by making the original C-based project even easier to port by removing whatever platform dependencies he could find, creating what he calls TinyBasicLike.

The main change is that TinyBasicLike consists out of two C files, with one containing the core code, and the second the platform-specific details that can be used by the core. Although [Karl] started off with the Palo Alto Tiny BASIC-like code by [Scott Lawrence], he decided to make it into his own by making a few alterations, such as adding left and right shift operators, adding an ADDR() function, expanding the features of INPUT and adding multiple logical operators.

In the example STM32F4 project linked on the project page it is demonstrated how to target a new platform with TinyBasicLike. Performance on the STM32F4 Discovery board with a simple counting loop yielded about 6 lines of TBL program code per millisecond. For a 168 MHz STM32 MCU that’s definitely not astounding, but considering how straightforward Tiny BASIC (and TBL as a consequence) is, it’s definitely no slouch.

This is probably a good time to remind that BASIC was the original champion of cross-platform programming and the source of countless fond (and frustrating) memories.

Quantum Computing On A Commodore 64 In 200 Lines Of BASIC

The term ‘quantum computer’ gets usually tossed around in the context of hyper-advanced, state-of-the-art computing devices. But much as how a 19th century mechanical computer, a discrete computer created from individual transistors, and a human being are all computers, the important quantifier is how fast and accurate the system is at the task. This is demonstrated succinctly by [Davide ‘dakk’ Gessa] with 200 lines of BASIC code on a Commodore 64 (GitHub), implementing a range of quantum gates.

Much like a transistor in classical computing, the qubit forms the core of quantum computing, and we have known for a long time that a qubit can be simulated, even on something as mundane as an 8-bit MPU. Ergo [Davide]’s simulations of various quantum gates on a C64, ranging from Pauli-X, Pauli-Y, Pauli-Z, Hadamard, CNOT and SWAP, all using a two-qubit system running on a system that first saw the light of day in the early 1980s.

Naturally, the practical use of simulating a two-qubit system on a general-purpose MPU running at a blistering ~1 MHz is quite limited, but as a teaching tool it’s incredibly accessible and a fun way to introduce people to the world of quantum computing.

Microsoft BASIC For The Dragon 64 Recovered

There are a great many pieces of software of yesteryear that are no longer readily accessible. It’s now possible to cross Microsoft BASIC for the Dragon 64 off that list, with the source code now posted for all to enjoy on GitHub.

The repository concerns the Microsoft 16K BASIC Interpreter as built for the Motorola 6809, as used in the Dragon 64 computer. This is also known as BASIC-69 or Extended Color Basic.

Hilariously, the source code was recovered from 340 pages of fan-fold tractor paper stored in four bundles. The output of a Motorola assembler was printed back in 1983 at Dragon Data’s R&D facility in Wales, and was recently recovered after being stored in an attic for much of the last four decades. The paper was carefully scanned at the 2022 Dragon Meetup, before passing the resulting images through OCR software. The output was then manually corrected and the source code was complete for both the 32K and 64K mode ROMs. There are some differences between the scanned source and what Microsoft shipped, which is outlined in the repository.

We’ve seen other heroic retrocomputer recovery efforts before, too, like the work to save the Polish CROOK OS. If you’ve been working on similar feats, be sure to let us know.

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”

TRS-80 Gains Multiple Monitor Support, And High-Resolution Graphics

To call [Glen Kleinschmidt] a vintage computing enthusiast would be an understatement. Who else would add the ability to control and address multiple VGA monitors to a rack-mounted TRS-80 Model 1? Multiple 64-color 640×480 monitors might not be considered particularly amazing by today’s standards, but for 70s-era computing, it’s a different story.

Drawing this sin(x)/x ripple surface can be done in only 17 lines of BASIC.

How does a TRS-80 even manage to output anything useful to these monitors? [Glen] wrote his own low-level driver in machine code to handle that. The driver even has useful routines that are callable from within BASIC, meaning that programs written on the TRS-80 are granted powerful drawing abilities. Oh, and did we mention that the VGA graphics cards themselves were designed and made by [Glen]?

Interested in making your own? [Glen] provides all the resources you’ll need to re-create his work, including machine code drivers and demonstration BASIC programs as downloadable audio files, just as they would have been on original cassette tapes.

Watch things in action in the videos embedded below. The first draws a Land Rover, and the second plots a simple Moiré pattern star. Not bad for 70s-era hardware and 74xx logic!

Continue reading “TRS-80 Gains Multiple Monitor Support, And High-Resolution Graphics”

A Commodore 64 running a smartwatch link program

The Commodore 64 Smartwatch Can Now Sync With Your Commodore 64 Desktop

If you’ve got a smartwatch on your wrist, chances are you’ve also got a device nearby that links up with it. Most modern watches will happily sync with Android devices or iPhones, and some will also talk to Windows PCs. But what if you’re running an alternative OS? Something like, say, Commodore BASIC? In that case, you might want to check out [Nick Bild]’s latest project, which lets you to sync your smartwatch to your Commodore 64.

Sadly, you can’t just use any old smartwatch: the project is an extension of [Nick]’s Commodore 64 Smartwatch that we featured earlier. This watch can run Commodore 64 programs thanks to a custom software stack, but like most typical smartwatches also includes an accelerometer that counts your steps. Syncing the step counter to your computer is straightforward: after you come home from your daily run, you simply tap “sync” on the watch, enter LOAD"SYNC.PRG",8,1 on your Commodore 64, and the computer will show your total step count.

The C64 watch communicates with the host computer through a built-in infrared port. The classic Commodore computers don’t have an IR receiver, so [Nick] built one himself using an Arduino Micro hooked up to the C64’s User port. A custom program reads out the data and shows the step count on the screen.

Although the feature set of this app is a bit limited, [Nick]’s project demonstrates how the good old Commodore 64 can still perform useful tasks in today’s world. Not that we needed much reminding: after all, we’ve even seen it run AI applications using TensorFlow Lite.

Continue reading “The Commodore 64 Smartwatch Can Now Sync With Your Commodore 64 Desktop”

PicoMite Gives Your Pico A Deluxe BASIC

What makes developing a microcontroller project quick and easy? Tops on our list are an interactive shell and comprehensive libraries that handle all the low-level peripheral stuff. You think we’re talking MicroPython? Not today! MMBasic has just been ported to the Raspberry Pi Pico dev board, and it has all the batteries included.

Just to give you a taste, it has built-in support for SD cards, all sorts of displays, touch screens, real-time clocks, IR remotes, numerous sensors, and of course WS2812 LED strips. And because all of this is baked into the BASIC, writing code to use any of these peripherals is straightforward.

Now, there’s BASIC and there’s BASIC. This is a modern BASIC: it has loops, functions, arrays, floating point, and a built-in full-screen editor. You connect to the Pico via UART, and you’re off to the races. If you’ve got a Pico sitting around, flash it and give it a try. Or check out the GitHub repository if you want to poke around in the internals.

This is a port of the BASIC that’s used on the Maximite virtual retrocomputer platform, which means that there are many working examples out there for you to crib from, and even a forum. Add in the incredibly nice user manual and tutorial (PDF), and you’ve got the perfect weekend afternoon.

Think MicroPython killed BASIC? Think again. BASIC is small enough that it can run where Python can’t, but that’s of course a more minimal experience. In contrast, MMBasic looks like it’s got all the toppings. The whole enchilada. It’s like BASIC Deluxe.