BASICally, Its Retro Machine Language

We enjoyed [Beej’s] trip down memory lane looking at a BASIC game, The Wizard’s Castle, written for the Exidy Sorcerer. It appeared in a 1980 magazine that included the title graphic above. It reminded us how, back in those days, we did things with BASIC that you shouldn’t be able to do and it often looks, today, rather cryptic.

In particular, even if you know modern BASIC, these few lines might give you a pause:

10 REM"_(C2SLFF4
40 POKE 260,218: POKE 261,1: T = USR(0): T = PEEK(-2049)
80 Q = RND(-(2*T+1))

Line 10 is a comment, but a strange one. Certainly that doesn’t matter, right? Actually, it is a key part of the action. On line 40, you can see some pokes to write directly to memory and a peek to read some memory value back. The USR function calls some machine language program. You may realize the whole thing is to get some value T to seed the random number generator in line 80.

This leads to a few obvious questions. First, how does USR know what to call? Second, where is the machine language program? The details varied by system, of course, but in this case, the program knows that location 259 has a jump instruction that USR called. So poking an address into 260 and 261 was telling USR where it should go.

But what’s at that address? Keep in mind that an old computer like the Sorcerer didn’t have megabytes of memory being swapped about by an operating system. That means that things tended to be in known places and that BASIC had to be judicious about storing source code.

Continue reading “BASICally, Its Retro Machine Language”

Remembering The Zilog Z80 As It Turns Fifty Years Old

Perhaps the saddest thing about the Zilog Z80 is that this humble 8-bit microprocessor wasn’t allowed to live until its 50th birthday. This, fortunately, doesn’t prevent people like [David Oberhollenzer] from reminiscing on this influential processor and what it means to them personally.

First released in July of 1976, this humble 8-bit miracle would go on to power not just a range of home computers, but also be found in everything from industrial controllers to arcade systems. Despite this success, the new owner of Zilog — Littelfuse — decided to put an end to this winning streak in 2024 for the stand-alone processor and its peripherals.

Continue reading “Remembering The Zilog Z80 As It Turns Fifty Years Old”

Yesterday’s Technology, Re-engineered Today

Watching [sprite_tm]’s build of a handheld 486-based gaming computer, we got to thinking about retro computers and the eternal questions of how much of the computer needs to be actually “old” for it it be retro. Where is the soul of a retro computer? The CPU? The old yellowing plastic case? Maybe it depends on what you’re trying to get out of the hobby.

There is of course a spectrum of people playing around with old computers. For some people, let’s call them “vintage computer enthusiasts”, half of the fun is in keeping the actual old hardware running. This group tends to know what teletype lubricant smells like, and how to tell which capacitors need replacing.

For others, “team retro”, the joy is in using the machine itself, whether that be teaching the old dogs new tricks, or simply loading up nostalgic video games. Team retro is more content with emulations or emulations that are wrapped up neatly in hardware workalikes. They know which registers need POKEing, and whether or not Commander Keen is running at the right framerate.

I think [sprite_tm]’s project falls in with yet another camp, the retro-reengineers. Here, the idea is to step through the engineering lessons of the past by re-designing something from a bygone era. So when [sprite_tm] went with a period 486 CPU backed up by a modern FPGA, perhaps ironically borrowing code from the modern MiSTer project, it makes sense for his goals. Retro-reengineers know the bus architecture and the memory timings, and they are reinventing the wheel as a learning experience. Or in the case of [Voja Antonic]’s imaginary four-bit machine, it’s a teaching experience.

How you work often reflects what you’d like to get out of the project, and at Hackaday, of course, we love all of the above! We’ve identified at least three broad schools of fooling around with old computers. Are we missing any?

Can Claude Write Z80 Assembly Code?

Betteridge’s law applies, but with help and guidance by a human who knows his stuff, [Ready Z80] was able to get a functioning game of Wordle out of the French-named LLM, which is more than we expected. It’s not like the folks at Anthropic spent much time making sure 40-year-old opcodes were well represented in their training data, after all.

For hardware, [Ready Z80] is working with the TEC-1G single-board-computer, which is a retrocomputer inspired by the TEC-1 whose design was published by Australian hobbyist magazine “Talking Electronics” back in the 1980s. Claude actually seemed to know what that was, and that it only had a hex keypad — though when [Ready Z80] was quick to correct it and let the LLM know he’s using a QWERTY keyboard add-on, Claude declared it was confident in its ability to write the code.

As usual for a LLM, Claude was overconfident and tossed out some nonexistent instructions. Though admittedly, it didn’t persist in that after being corrected. It’s notable that [Ready Z80] doesn’t prompt it with “Give me an implementation of Wordle in Z80 assembly for the TEC-1G” but goes through step-by-step, explaining exactly what he wants each section of the code to do. As [Dan Maloney] reported three years ago, it’s a bit like working with a summer intern.

In the end, they get a working game, but that was never in question. [Ready Z80] reveals over the course of the video he has the chops to have written it himself. Did using Claude make that go faster? Based on studies we’ve seen, it probably felt like it, even if it may have actually slowed him down.

Continue reading “Can Claude Write Z80 Assembly Code?”

Who Had “New OS For The Z80” On Their 2026 Bingo Card?

Some might say the venerable Z80 doesn’t need another operating system, but [Scott Baker] obviously disagrees. He has come up with a brand new, from scratch OS called NostOS for the Z80-based RC2014 homebrew retrocomputer. [Scott] describes it as CP/M-like, but it’s not CP/M– in fact, it’s totally incompatible with CP/M–and has a few tricks of its own up its sleeve.

As you might expect of an operating system for this vintage of hardware, it is “rommable” — that is, designed to run from read-only-memory, and fit inside 64kB. It of course supports banking memory to go higher than that 16 bit limit, and natively supports common serial devices, along with the good old WD37C65 floppy controller to get some spinning rust into the game. Of course if you don’t have floppies you can plug in a compact flash card– try that with CP/M– or, interestingly Intel Bubble Memory. [Scott] has a soft-spot for bubble memory, which at one point seemed poised to replace both hard drives and RAM at the same time. We also appreciate that he included drivers for vacuum fluorescent displays, another forgotten but very cool technology. Back in the day, this operating system would have enabled a very cool little computer, especially when you take his implementation of text-to-speech with the SP0256A-AL2 chip. Fancy a game of talking Zork? Yes, he ported Zork, and yes, it talks.

The whole thing is, of course, open-source, and available on [Scott]’s GitHub. Unlike too many open-source projects, the documentation is top-notch, to the point that we could picture getting it in a three-ring binder with a 5 1/4 floppy on the inside cover. If you like video, we’ve embedded [Scott]’s walkthrough but his blog and the docs on GitHub have everything there and more if you’re not into rapidly-flickering-pixels as an information exchange medium.

[Scott] isn’t wedded to Zilog, for the record; this OS should run on an Intel 8080, perhaps like the one in the Prompt 80 he restored last year. 

Thanks to [Scott Baker] for the tip!

Continue reading “Who Had “New OS For The Z80” On Their 2026 Bingo Card?”

PicoZ80 Is A Drop-in Replacement For Everyone’s Favorite Zilog CPU

The Z80 has been gone a couple of years now, but it’s very much not forgotten. Still, the day when new-old-stock and salvaged DIP-40 packaged Z80s will be hard to come by is slowly approaching, and [eaw] is going to be ready with the picoZ80 project.

You can probably guess where this is going: an RP2350B on a DIP-40 sized PCB can easily sit on the bus and emulate a Z80. It can do so with only one core, without breaking a sweat. That left [eaw] a second core to play with, allowing the picoZ80 to act as a heck of an accelerator, memory expander, USB host, disk emulator– you name it. He even tossed in an ESP32 co-processor to act as a WiFi, Bluetooth, and SD-card controller to use as a virtual, wirelessly accessible disk drive.

The onboard ram that comes with an RP2350B would be generous by 1980s standards, but [eaw] bumped that up with an 8 MB SPRAM chip–accessed in 64 pages of 64 kB each, naturally. If more RAM than a very pricey hard drive wasn’t luxury enough, there’s also 16 MB of flash memory available. That’s configured to store ROM images that are transferred to the RAM at boot– the virtual Z80 isn’t grabbing from the flash at runtime in [eaw]’s architecture, because apparently there are limits to how much he wants to boost his retro machines. Continue reading “PicoZ80 Is A Drop-in Replacement For Everyone’s Favorite Zilog CPU”

From 8086 To Z80: Building A NASM-Inspired SDK For 8-Bit Retro Computing

Assembler syntax is a touchy subject, with many a flamewar having raged over e.g. Intel vs AT&T style syntax. Thus when [Humberto Costa] recently acquired an MSX system for some fun retro-style ASM programming, he was dismayed to see that the available Z80 assemblers did not support the syntax of his favorite ASM tool, NASM. Thus was born the HC SDK project, which seeks to bring more NASM to the Z80, 8085 and a slew of other processors.

There’s both a project site and a GitHub repository, from where both source and pre-compiled releases can be obtained. Supported host platforms are macOS, Windows, OpenBSD, FreeBSD, and Linux, with currently supported targets the 8080, 8085, 8086 and Z80. Support for the 6502 is currently in progress.

The Netwide Assembler (NASM), targets only the x86 architecture, being one of the most popular assemblers for Linux and x86. It uses a variant of the Intel ASM syntax, which contrasts it strongly with the GNU Assembler (GAS) that uses AT&T syntax. Of course, in an ironic twist of fate NASM now also supports AT&T syntax and vice versa, albeit with some subtle gotchas.

Regardless, if ASM for these retro architectures is your thing, then the HC SDK may be worth checking out. [Humberto] also says that he’s looking at adding higher-level language support to make it a more complete development environment for these old systems and new takes on them.

Thanks to [Albert Wolf] for the tip.