Do Some ARM – Info Gadgets
A long, long time ago, in a countryside far away, there was a young man playing with tech in his parents’ garage who discovered the beauty of computers, and gaming, and coding, and writing code to make new games.
It was 1987 and it was the beginning of a love affair that would last more than three decades.
I spent quite a bit of time dreaming about working on a lovely little unit called the Acorn Archimedes, in between working on my BBC Micro, creating custom arcade hardware, and working on the NES at Rare, Ltd. The Archimedes used a new processor called the ARM2 and had a revolutionary instruction set architecture, which struck me as elegant, beautiful even, because of the simplicity of its vision.
The audacity of the way each 32-bit wide instruction was chunked into smaller bit-fields — compartments describing where data should be read, written, and what flags to check — the program counter appearing as a register like any other, the ability to read and write multiple 32-bit registers worth of data in a single instruction…it didn’t feel like the spaghetti encoding of instructions on so many of the other processors I’d seen before.
Dedicating these precious bits seemed almost wasteful, something that you simply couldn’t possibly do if there were fewer bits available (like the 8 and 16-bit processors I had used previously), but doing so enabled a short-list of well thought out instructions to be implemented in just 25,000 transistors. This setup enabled low power consumption (a key feature with unrealized importance at the time), and deterministic, easily-understood behavior. At a time when Intel was already creating complex instruction set processors like the 80386, which was released a year earlier, and contained 275,000 transistors.
Two years later, I was finally able to acquire my own Acorn Archimedes, and I loved that machine. I quickly got down to the metal, coding blazingly fast sprite drawing routines for 2D games, and line and polygon shaders for 3D games, all in ARM assembly language.
It was everything I had hoped for. Well, nearly everything…
A company called Watford Electronics advertised an upgrade for the Archimedes, in my favorite publication, Acorn User. The upgrade was a new chip called the ARM3, which included a 4KB cache, capable of increasing processing throughput by a factor of five. All you needed was the new processor board and a piece of software to enable it.
FIVE TIMES speedup, WOW! It was not cheap though, and my garage-based software studio could not yet run to splurging on such extravagance.
Then, a friend came by to help install a second hard drive in my Archimedes — I had traded an ancient and giant oscilloscope for said drive and I asked for his help physically fitting it into the Archimedes case. It was my first time taking the lid off, and I was enthralled to see this wonderful ARM2 chip in the silicon (so to speak) for the first time.
When the lid came off, I was a bit confused to discover my lovely ARM2 chip was marked ARM3. Could it have been marked wrong? Was ARM3 even close to release when I first got my Archimedes? Could this be an early prototype?
What to do? How could I get my hands on the software required to try and activate the ARM3’s cache upgrade?
I hatched a plan to call Watford Electronics and innocently ask for a new copy of the software disk to turn on the ARM3 cache and determine if what I had was indeed an early ARM3 sample. I was nervous they would grill me, ask for my order number, and tell me there’d been some terrible mistake and I must ship this valuable prototype back immediately, because clearly there had been some terrible mistake when my computer was made and they’d want their prototype back immediately.
Instead, they asked me to send a check for £2.50 to cover the cost of the disk and shipping.
After 10 days of eagerly rushing downstairs each morning to check the post, it arrived! If you are picturing that scene in A Christmas Story when Ralphie finally gets his decoder ring, yeah, that’s probably about right. I put the disk in, ran the program, and nothing special seemed to happen. It didn’t give me an error, so there was that.
I ran a few programs I knew would challenge the system and…wow. It was FAST! I wrote a few lines of code to perform ten thousand matrix operations. I nearly fell out of my chair with excitement at the blazing speed.
Over the next several months, I learned how to fully exploit the 4K cache in this speed machine, and even shared a few high-speed polygon rasterization routines for 3D game development with programmer buddies developing games for the same publisher I favored. Ahhhh, good times.
RISCy Business
The elegance and simplicity of the ARM architecture, and the functionality of RISC OS, were wonderful. So great in fact, I wagered the ARM architecture would dominate the PC market, and I set about creating all sorts of fun things. Sadly, I was wrong.
In the meanwhile, working with that processor fundamentally changed who I was and who I wanted to be. I didn’t want to just solve small pieces of the puzzle and make small things. I was inspired to architect audacious things — creative, wonderful, game-changing things that would solve complex problems and revolutionize whatever…everything…all my work.
The effort the creators put into the ARM core’s design — it’s clarity, the self-consistency of each interlocking part of its instruction set, and the leap from 8-bit or 16-bit to the awesome power of manipulating 32-bits at a time. The boldness of their vision that enabled a simple design to be so powerful — their embrace of brave, adventurous, market-disrupting things…I wanted to be that good. So, so, much.
The 32-bit ARM 2 could run at eight million cycles per second, and the hardware implementation of the instruction set meant most instructions required only a single cycle to execute. Multi-register and memory operations could be written into a single instruction, allowing easy manipulation of huge bit-widths.
The instruction set felt manageable — flags accessible everywhere, with instructions that didn’t force use of specific registers for things like receiving the results of arithmetic operations, or indexes for looking up data, or offsets for jump tables.
The ARM delivered flexibility and freedom, and empowered creativity.
One quick caveat — I like assembly language. I like getting down to the “metal” and writing direct to the machine. I’ve often been frustrated by compilers because they distance you from the silicon. Old compilers would sometimes do dumb things, slow things, butchering some efficient algorithm by adding unnecessary and repetitive instructions, completely misunderstanding the programmer’s intent.
Working with the Archimedes to create a bunch of awesome stuff was a labor of love. I adored what I could, and did, do with that machine. Among other things, I wrote an over-the-top, beat-‘em-up game I dubbed Grievous Bodily ‘ARM. Yes, that’s how much I loved that computer — I named a game after the CPU.
Then, I spent quality time creating a suite of game development tools for the Sega Genesis console. Including reverse engineering game cartridges, and fabbing my own in my parents’ garage (where else would you put an acid bath?) that would run on the Genesis, which eventually lead to the job that brought me to the U.S.
Strong ARMing the Market
To be clear, I do understand the attraction of C-compilers allowing programmers to avoid the complex and time-consuming task of writing in assembly language, but I was always a bit sad about the marginalization of coding in assembly, a somewhat lost art that allows programmers to get right down to the heart of the system, able to squeeze every ounce of performance out of the silicon.
Of course, over the past thirty years we’ve developed many new programming languages, and languages built upon languages. I learned to love C and C++, their output eventually rivaling the best hand-crafted assembly language, and in recent years I fell for Python and Ruby, which allow the programmer to be expressive with just a few lines of code, the antithesis of assembly language — elegance from the opposite end of the aesthetic spectrum.
But still, I’ve always had a soft spot, a nostalgia, for ARM — and it turns out that’s a good thing because I wasn’t wrong, I was just a bit early — thirty years early as it turned out.
One of the advantages of the ARM architecture is its efficiency. The code is simple and the processors run with minimal power demand — which is why ARM is the core of choice for modern cell phones, tablets, televisions, refrigerators, smart thermostats, security systems, and a new breed of IoT devices.
After a long drought, the flood came in the early noughties. By 2010, billions of ARM-based processors were produced, and now it’s tens of billions.
So, this is an homage of sorts — to an incredible team with an audacious vision of what could be. The ARM processor was revolutionary — a rock solid foundation that is holding up whole industries today. Its creators, that clever bunch who conceived something so game-changing three decades ago, now license the plans for their radical ARM core, which has stood the test of time when so many others have been relegated to museums — it just wasn’t meant for the desktop computer after all. Their creativity and courage thirty years ago have, in a sense, made them unsung heroes of the modern mobile age. Which isn’t a bad thing to have as your legacy.
This is a celebration of the architecture they envisioned and realized, the profound impact their work has had on me as a person, literally altering the way I think about solving problems, and the deep impact their creation has had on the world.
Yes, I know I’m gushing a bit — okay, more than a bit. For the low, low price of £2.50, and a self-addressed envelope, I can send you a handy sick bag to flush your internal cache.
Or, you can just go buy a Raspberry Pi and run RISC OS at BLAZING speeds to discover the joy of programming on an ARM-based computer (for a fraction of the cost of my original Acorn Archimedes). You never know, maybe you’ll love it, maybe it will lead you down strange, creative roads and you’ll end up in places you never thought you’d be.
Article Prepared by Ollala Corp