Unearthing My 1996 Windowed OS in Machine Code for Am29000 Homebrew Computer

In 1996, I developed a windowed operating system in 32-bit machine code for a custom Am29000 computer built by my father. Despite the processor's legendary speed, I faced challenges with memory and porting code from my Z280 system. Inspired by OS/2 and X11R5 source code, I implemented cooperative multitasking and a unique window clipping algorithm to create a functional GUI that fit entirely on a floppy disk.
The real discovery was the message pipeline. Every process with windows has a message pipeline, and when you create a window you should assign it a kind of interface handler, and this handler reads the messages and it does operations according to the user's interactions.
- Joker_vD
> The subtraction instruction has a set with reversed operands, so we have SUB, SUBU, SUBS, SUBC, SUBCU, SUBCS, but also SUBR, SUBRU, SUBRS, SUBRC, SUBRCU, SUBRCS.
Pretty much the only use of "reversed subtraction" instruction on a 3-operand machine is to implement NEG (subtract from immediate zero) and NOT (subtract from immediate -1, which Am29000 can't actually do since it zero-extends the immediates)... but NOT is usually not a very useful operation on its own anyway, especially when you have an actual ANDN instruction (most of the uses of ~ in C are of "var &= ~mask" or "expr & ~mask" variety) and a whole slew of NAND/NOR/XNOR instructions as well. Oh, and also, if you know for sure that your value is either 1 or 0, you can logically negate it by subtracting it from immediate 1.
On the other hand, on a 2-operand machine "SUBR reg, reg" is a surprisingly useful instruction.
> I made a phantom ROM that reads the disk using a special instruction coded in the emulator, and returns on unhandled services.
Really puts into perspective just how useful BIOS/UEFI utilities are, doesn't it? Just give me the device tree info (or the equivalent) and load the bloody OS image, thank you, that's all I need.
> I find fun how they implement the multiplication instruction using a trap and 32 continuous MUL instructions (bit-shifting all the way).
They did division the same way; I believe it was a done as a clever to have an interruptible MULTIPLY/DIVIDE instructions: otherwise, those 32-35 […]
- ndiddy
Great article! I remember reading about the Toledo family's computer systems ( http://www.biyubi.com/ ) years ago, but never saw any specifics so they were always shrouded in mystery to me. It's interesting reading about how you wrote the OS and seeing it run in an emulator. It's really impressive that you were able to write such a complex system in machine code.
- taolson
Wow, blast from the past! I was on the architecture / micro-architecture team for the 29K and 29050, and your story of writing and debugging the emulator brought up similar memories of working on the performance simulator for these chips.
Very impressive work -- congratulations!
- rbanffy
Somewhere in my collection I have an AMD 29K-based tablet that was used in São Paulo's stock exchange trading floor. It had a huge IR LED array that, I assume, was used to transmit orders to receivers installed near the monitors. I managed to boot it from ROM, but it seemed the machine was waiting for the transmitter to send it its boot image.
Would have been an interesting project. Considering the size of the array, I'd be able to control all TVs from the building one block down.
- fidotron
How is the phrase "register window" not in this article? https://en.wikipedia.org/wiki/Register_window
"The AMD 29000 improved the design by allowing the windows to be of variable size, which helps utilization in the common case where fewer than eight registers are needed for a call. It also separated the registers into a global set of 64, and an additional 128 for the windows."
Amazing stuff. (Both the 29K and the article).