Reconstructed SC62015 Opcode Reference For Sharp Pocket Computers

Pocket computers like Sharp’s 8-bit computing marvels were a big part of the 1980s, providing super-portable processing power to anyone who wanted a bit more than what something like a scientific calculator could provide at the time. These days they are mostly just a collector’s item for retrocomputing enthusiasts, which also means that a lot of the knowledge about how to program the CPUs in them is at risk of being lost.

This is why [gikonekos] decided to combine as much knowledge they can glean from official documentation into a reference project on GitHub for the SC62015 equipped Sharp pocket computers like the PC-E550.

Generally you’d program in Sharp’s dialect of BASIC on these computers, such as the ‘PLAY3’ program that [gikonekos] recently unearthed from a November 1993 copy of ‘Pocket Computer Journal’ using which you can create polyphonic tunes. This only unlocks a small part of what the hardware can do, of course, so having a full opcode reference like this is important.

While still a work in progress, it’ll eventually contain the full opcode and register tables, addressing modes, instruction summaries and of course a full accounting of how all of this was reconstructed. As the original Sharp documentation wasn’t released to the public, providing these scans is also not a goal, especially not under any kind of free license.

A cursory search reveals an instruction table for the PC-E500 from 1995 by [Andrew Woods], so documenting this is not a new thing, although at the time these Sharp pocket PCs didn’t count as ‘retro systems’ yet.

BASIC On A Calculator Again

We are always amused that we can run emulations or virtual copies of yesterday’s computers on our modern computers. In fact, there is so much power at your command now that you can run, say, a DOS emulator on a Windows virtual machine under Linux, even though the resulting DOS prompt would probably still perform better than an old 4.77 MHz PC. Remember when you could get calculators that ran BASIC? Well, [Calculator Clique] shows off BASIC running on a decidedly modern HP Prime calculator. The trick? It’s running under Python. Check it out in the video below.

Think about it. The HP Prime has an ARM processor inside. In addition to its normal programming system, it has Micropython as an option. So that’s one interpreter. Then PyBasic has a nice classic Basic interpreter that runs on Python. We’ve even ported it to one or two of the Hackaday Superconference badges.

Continue reading “BASIC On A Calculator Again”

String art rendering of a face

BASIC Programming With No Strings Attached

Today in programming language hacks we have string art rendered in BASIC. String art — also known as pin and thread art, or filography — is an art form where images are invoked by thread woven between pins on the border of an image. In this case the thread and the pins are virtual and there is a simple 67 line BASIC program which generates and renders them.

Of course BASIC, the Beginner’s All-purpose Symbolic Instruction Code, isn’t just one thing and was a bit of a moving target over the years. Invented in 1964 at Dartmouth College by John Kemeny and Thomas Kurtz it turned into a family of languages as a dynamic array of implementations added, removed, and changed implementation details as the future unrolled.

We remember GW-BASIC and QuickBASIC, but the landscape was much broader than that. Implementations of QuickBASIC came with a “compiler”, qb45.exe, which worked by bundling the BASIC script as p-code into an executable along with the runtime binary, which we used back in the day to make “real applications”, not mere scripts.

Thanks to [Keith Olson] for writing in to let us know about this one. If you’re interested in seeing what the state of the art in string art is, be sure to check out String Art Build Uses CNC To Make Stringy Art and CNC Router Frame Repurposed For Colorful String Art Bot. The best string art is in the real world, not software!

BASICODE: A Bit Like Java, But From The 1980s

Those of us ancient enough to remember the time, or even having grown up during the heyday of the 8-bit home computer, may recall the pain of trying to make your latest creation work on another brand of computer. They all spoke some variant of BASIC, yet were wildly incompatible with each other regardless. BASICODE was a neat solution to this, acting as an early compatibility standard and abstraction layer. It was essentially a standardized BASIC subset with a few extra routines specialized per platform.

But that’s only part of the story. The BASICODE standard program was invented by Dutch radio engineer Hessel de Vries, who worked for the Dutch national radio broadcaster Nederlandse Omroep Stichting (NOS). It was designed to be broadcast over FM radio! The idea of standardization and free national deployment was brilliant and lasted until 1992, when corporate changes and technological advancements ultimately led to its decline.

Continue reading “BASICODE: A Bit Like Java, But From The 1980s”

Microsoft BASIC For 6502 Is Now Open Source

An overriding memory for those who used 8-bit machines back in the day was of using BASIC to program them. Without a disk-based operating system as we would know it today, these systems invariably booted into a BASIC interpreter. In the 1970s the foremost supplier of BASIC interpreters was Microsoft, whose BASIC could be found in Commodore and Apple products among many others. Now we can all legally join in the fun, because the software giant has made version 1.1 of Microsoft BASIC for the 6502 open source under an MIT licence.

This version comes from mid-1978, and supports the Commodore PET as well as the KIM-1 and early Apple models. It won’t be the same as the extended versions found in later home computers such as the Commodore 64, but it still provides plenty of opportunities for retrocomputer enthusiasts to experiment. It’s also not entirely new to the community, because it’s a version that has been doing the rounds unofficially for a long time, but now with any licensing worries cleared up. A neat touch can be found in the GitHub repository, with the dates on the files being 48 years ago.

We look forward to seeing what the community does with this new opportunity, and given that the 50-year-old 6502 is very much still with us we expect some real-hardware projects. Meanwhile this isn’t the first time Microsoft has surprised us with an old product.


Header image: Michael Holley, Public domain.

Exploring The TRS-80’s Color BASIC’s Random Number Function

Although these days we get to tap into many sources of entropy to give a pretty good illusion of randomness, home computers back in the 1980s weren’t so lucky. Despite this, their random number generators were good enough for games and such, as demonstrated by the [CoCo Town] YouTube channel.

The CoCo is the nickname for the TRS-80 Color Computer, which despite its name, shares absolutely nothing with the TRS-80. Its BASIC version is called Color BASIC, which like many others was based on Microsoft BASIC, so the video’s description should be valid for many other BASIC versions as well. In the video we’re first taken through a basic summary of what the floating point format is all about, before running through an example of the algorithm used by Color BASIC for its RND function, using a test program written in Color BASIC.

As described in the video, the used algorithm appears to be the linear congruential generator, which is a pseudo-random generator that requires minimal resources from the hardware it runs on. Of course, its main disadvantage is that it will fairly rapidly begin to repeat itself, especially with a limited number of output bits. This makes it a decent choice even today for something like simple game logic where you just want to get some variation without aiming for cryptographically secure levels of randomness.

Continue reading “Exploring The TRS-80’s Color BASIC’s Random Number Function”

A Proper Computer For A Dollar?

When a tipster came to us with the line “One dollar BASIC computer”, it intrigued us enough to have a good look at [Stan6314]’s TinyBasRV computer. It’s a small PCB that forms a computer running BASIC. Not simply a microcontroller with a serial header, this machine is a fully functioning BASIC desktop computer that takes a PS/2 keyboard and a VGA monitor. Would that cheap price stand up?

The board uses a CH32 microcontroller, a RISC-V part that’s certainly very cheap indeed and pretty powerful, paired with an I2C memory chip for storage. The software is TinyBASIC. There’s some GPIO expandability and an I2C bus, and it’s claimed it can run in headless mode for a BASIC program to control things.

We haven’t added up all the parts in the BoM to check, but even if it’s not a one dollar computer it must come pretty close. We can see it could make a fun project for anyone. It’s certainly not the only small BASIC board out there, it’s got some competition.

Thanks [Metan] for the tip.