Tandy Pocket Computer Assembly Is… Weird

Radio Shack had a long history of buying things overseas, having their name slapped on them, and selling them in the United States. That was the case with the Tandy Pocket Computers, which were in that awkward space between calculators and full-blown computers. Like many computers of those days, if you wanted to do anything interesting, you needed to turn to assembly language. But as [Old Vintage Computing Research] recalls, the assembly for these little devices was very strange, even for an assembly language. He found out that there is a reason it is so strange and shares it in a deep dive into the device’s machine code history.

The story starts with the Japanese government. In 1969, the ministry in charge of such things decided that it wouldn’t be fair for people who knew a particular computer to have an advantage when taking the Information Technology Engineer exam. So, logically, they made up a fictitious instruction set and architecture for the test. Since no one used it, no one would have an unfair advantage.

However, eventually, Japanese manufacturers started making computers that used the architecture. The architecture was COMP-X, and the assembler was CAP-X. The post covers the history of machines either using the architecture or emulating it going back to the 1970s. It eventually winds up at the Sharp and Casio pocket computers that would wear Radio Shack livery in much of the world, especially the United States.

What is interesting is that the computers actually used a different native assembly language but emulated COMP-X. However, in most cases, it was the only assembler supported for end users. The fake CPU was a 16-bit machine like many minicomputers of the 1970s. There were three general registers, a program counter, a condition code register, and a base address register.

What it didn’t have was a stack or interrupts. It appears the design is somewhat similar to the PDP-8, but not a clone. In addition, the pocket computers had a few nonstandard instructions for things like I/O.

When we say deep dive, we aren’t kidding. The post goes into quite a bit of detail regarding the actual language and how to accomplish different tasks. But even if you don’t want to write pocket computer programs, it is a great glimpse into the past. It isn’t related to the post, but if you want to see what many of the old Radio Shack pocket computers looked like, check out the video below. Or you can dig out your back issues of Hackaday. People still hack on these things.

19 thoughts on “Tandy Pocket Computer Assembly Is… Weird

  1. “Pocket computers and handheld computers occupied a strange niche in the 1980s and very early 1990s sandwiched between calculators and more conventional portable computers (laptops, portable workstations and so forth), largely using bespoke low-power CPUs and small, sometimes single-line LCD screens.”

    The expression back then was luggable. Not particularly “portable” especially requiring an AC cord.

    https://www.britannica.com/technology/laptop-computer

      1. We had to use mixal for an assembly language course at Purdue in the ’70s. The course moved to COMPASS for CDC 6500 after the first few weeks. The shift was planned in the course because the CDC 6500 was an unusual architecture (1s complement and 60-bit in a world of 8-, 16-, and 32-bit 2s complement machines). The shift in architectures generated lots of opportunities for pedagogical discussion.

  2. Nearly every widely used modern processor, no matter how different it looks, is much more closely related to the Intel 8080 than any of these old minicomputers and mainframes. No stack was a common un-feature, and the HP2100A executed a subroutine call by writing the return address to the first word of the subroutine code in RAM, then skipping it before starting execution, and returning with an indirect jump. No recursion for you! It was also common for test instructions to skip the next instruction on pass or fail, so any instruction could be made conditional not just jumps and calls. And you could also often pack several small math instructions into a single word for efficiency, since RAM is rather precious when 8 kilobytes costs over $20K (magnetic core days).

  3. The TMS 9900 used in the TI 99/4a had no true stack or special purpose registers. It was a wild design if you were coming from “standard” microprocessors.

    From Wikipedia.

    > The minicomputer roots of the TMS9900 give rise to a number of architectural features that are not commonly found on designs that started from a blank sheet. Notable among these was the TMS9900’s use of processor registers that are mapped into main memory.
    > There is no concept of a stack and no stack pointer register. Instead, branch instructions exist that save the program counter to a register and change the register context. The 16 hardware and 16 software interrupt vectors each consist of a pair of PC and WP values, so the register context switch is automatically performed by an interrupt as well.

    1. In the days when the bandwidth to your register and your main memory were no more than an order of magnitude apart, this was super smart (I thought it was at the time). But it was doomed as internal memory got much faster compared to external memory access and caching became prevalent.

      1. “…this was super smart”

        Have to agree. The *only* reason for caching is because external memory (now) cannot keep up with the processor core (and a whole slew of little soldier problems that got created along the way). Think where we could have been today, had we not gone down the DRAM route, and put that money and R&D into static RAM?

        Apart from that, our computing paradigm has not changed in 50 years. If you knew a 8080, or 6800 series processor, then you know every single processor since then.

  4. I remember a $6-12 credit card sized organizer that ran on a button battery and used similar LCD matrix displays from the late 80’s… Single chip-under-epoxy-blob PCB inside.

    Perfect thing to make your friend with the calculator watch jealous. Fun times.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.