Learning from the Amiga API/ABI

48 danny00 38 6/1/2025, 2:21:29 PM asm-basic-coder.neocities.org ↗

Comments (38)

flohofwoe · 11h ago
AmigaOS still has a special place in my heart, probably the most elegantly designed piece of software I've ever seen (apart from that ugly DOS part of course which was shoehorned in because of deadline pressure).

There was a single fixed location in the entire system (address 0x4 aka ExecBase), and everything an AmigaOS application required was 'bootstrapped' from that one fixed address.

All OS data structures were held together by linked lists, everything was open and could be inspected (and messed up - of course terrible for security, but great for learning, exploring and extending).

mpweiher · 11h ago
Amiga Exec completely spoiled me when it came to elegance of operating systems.

Everything I learned about after it was a huge disappointment, including Mach. Particularly because it demystified the OS. Just a bunch of of lists, and due to the OO nature, they were the same kinds of lists.

Here's what a node looks like: next, previous, a type, a priority, a name.

A task? A node. With a bunch of extra state.

An interrupt? A node. With a lot less extra state.

A message? A node. With an optional reply port if the message requires a reply.

Reply port? Oh, that's just a port.

A port? Yeah, a node, a pointer to a task that gets signaled and a list of messages.

How do you do I/O? Send special messages to device ports.

No "write() system call", it's queues at the lowest levels and at the API layer.

mitchbob · 10h ago
orionblastar · 14h ago
My Amiga 1000 ran rings around the Macintosh with the same CPU, because it had custom co-processors that speed things up and worked as a team.

You can still have that Amiga feeling on old PCs by using AROS: https://aros.sourceforge.io/

Findecanor · 13h ago
I think that it also having preemptive multitasking also made a huge difference to make the system responsive and feel fast. The GUI, with its windows and gadgets (= "widgets"/"controls") ran in Intuition's task. The mouse pointer was moved by a vblank interrupt and could thus never lag.

On Macintosh, the whole GUI ran practically in the active app's event loop. The whole system could be held up by an app waiting for something.

Microsoft made the mistake of copying Apple when they designed MS-Windows. Even this day, on the latest Windows, which although it has had preemptive multitasking since 1995, a slow app can still effectively hold up the user interface thus preventing you from doing anything but wait for it.

When Apple in the late '80s wanted to make their OS have preemptive multitasking, they hired the guy who had written Amiga's "exec" kernel: Carl Sassenrath.

jchw · 13h ago
> Even this day, on the latest Windows, which although it has had preemptive multitasking since 1995, a slow app can still effectively hold up the user interface thus preventing you from doing anything but wait for it.

Could you explain what you mean here? If you were to make your event loop or wndprocs hang indefinitely it would not hang the Windows interface for the rest of the machine, it would just cause ANR behavior and prompt you to kill the program. As far as I can remember it's been that way since at least Windows 2000.

zozbot234 · 12h ago
I think what OP's saying is that on the Amiga it was idiomatic to let the UI be handled by a dedicated thread/task. That was also the norm on other notable systems such as BeOS. It's still a good guideline today but not so easy to apply.
Findecanor · 12h ago
I mean the windows. An app can open a window and hold it there, and meanwhile you can't move the window, you can't move it to the back and you can't minimise it.
jchw · 8h ago
Oh I see. I'm not familiar with the model used by Workbench and how it differs exactly.

(edit: and to be clear, I did read the article and see what it said, but without more detail I'm not 100% sure what it really looks like in practice, and why it would be less likely for applications to have situations where they become unresponsive.)

orionblastar · 6h ago
Amiga computers are expensive these days, you are better off with an Amiga Emulator like Amiga Forever.

I remember the Amiga had the checkered beach ball bouncing demo and others copied it, then on the Amiga they opened up several copies of the demo all multitasking and bouncing at the same time.

The only downside of the Amiga was the dreaded Guru Meditation Errors when memory went corrupt or something. IIRC AmigaDOS/Workbench had no protected memory features.

zozbot234 · 5h ago
> IIRC AmigaDOS/Workbench had no protected memory features.

This was a limitation of the original MC68k CPU architecture. Though the Amiga operating system was indeed designed to leverage a single address space throughout, which made it significantly harder to retrofit memory protection after the fact.

detourdog · 13h ago
I always thought even though the Mac was black & white the screen resolution was much nicer than the Amiga.
badc0ffee · 11h ago
Unlike the Amiga, it's high resolution, has square pixels, and is never interlaced.
leptons · 9h ago
The original Macintosh had a resolution of 512 x 342 pixels. The Amiga 1000 had several resolutions up to 640 x 400 @ 16 colors, and could utilize 4096 colors in lower resolutions. The reality distortion field seems to still be working, I guess. The Amiga was better in every way practical way.
AndrewStephens · 8h ago
The differences between the Amiga and Mac are a fascinating study in priorities. The Amiga was orientated around home use so its graphics hardware was designed to be attached to a TV. That design goal affected the entire system, to the point that the system clock changes frequency depending on whether the machine is outputting PAL or NTSC.

Technically the Amiga could display a rock solid hires picture but only on a special monitor that I personally never saw.

The priority on the Mac was to have a high quality monitor for black and white graphics. They put a lot of effort into drawing libraries to make the most of in-built display.

The result was that the Amiga was perfectly fine for playing games or light word processing but if you actually needed to stare at a word processor or spreadsheet for 8 hours a day you really wanted a Mac.

leptons · 5h ago
Nope. The Amiga did just fine 8 hours a day, even 16 hours a day, coding and word processing and everything else. Interlace wasn't a huge issue, and the price difference between Macintosh and Amiga made it easy to justify. A simple "flicker fixer" could be added for far less than the difference in price between an Amiga and a Mac. The Mac cost $1000 more than an Amiga, which is a lot to pay to get a far less capable platform. A "flicker fixer" went for $100.

Apple in the 90's was cirlcing the drain, nobody wanted an overpriced black-and-white computer except die-hard apple fans, and Apple only exists today because Microsoft bailed them out. Too bad Microsoft didn't invest in Amiga instead.

orionblastar · 2h ago
Not to mention, with emulators like A-Maxx, the Amiga could run Mac software: https://amiga.resource.cx/exp/amax

There were even C64, Apple II, IBM PC-DOS, and Atari ST emulators for the Amiga.

icedchai · 8h ago
Are you forgetting about interlace? You won’t want to use 640x400 for very long due to the low refresh rate.
leptons · 5h ago
The top resolution was 640 x 400, not lower than the Mac, which had one single 2-color resolution. Interlace didn't bother me, but a "flicker fixer" was only $100. The Amiga had a ton of cheap and easy mods depending on what your interests were.
detourdog · 9h ago
I think you are missing the point. I was an actual user of both and preferred the macintosh. The Amiga graphics were color but underwhelming in resolution.
Zardoz84 · 8h ago
Mac : 512x342 Amiga : 640x400

In what universe 512x342 was better that 640x400 ?

Findecanor · 8h ago
640×400 was an interlaced mode. Every other scanline was shown every other frame. This was a NTSC TV signal, remember?

There was an add-on called a "Flicker Fixer" that cached the video signal and emitted VGA-signals at twice the pixel clock and horizontal refresh rate. The Amiga 3000 had one built in.

The ECS and AGA chipsets supported "Productivity mode" that emitted VGA signals but ECS supported only four colours in this mode. All games used the TV modes. "Multisync" monitors that could switch between VGA and television refresh rates were expensive, so few people had them.

leptons · 5h ago
A "flicker fixer" cost $100. The macintosh cost $1000 more than the Amiga. The math is rather simple here.
icedchai · 2h ago
As I mentioned in a previous post, it cost a LOT more than $100. $500 for a Microway flicker fixer + another $400 for the monitor. They may cost $100 "today", but at the time, it was very expensive.

Also remember the Amiga was competing with the Mac II line for most of its life. Yes, it was much more expensive... but we are comparing specs, and you could get Mac II displays that supported 256 colors out of 16 million (24-bit.) The Amiga didn't have 24-bit color until 1992.

leptons · 8h ago
>The Amiga graphics were color but underwhelming in resolution.

You cannot be serious. I provided the ACTUAL specifications of the screen resolution of both platforms, and somehow you still say the Amiga was "underwhelming in resolution" when it actually had MORE pixels in both horizontal and vertical than the Macintosh? How can you actually say this? The Amiga had 256,000 pixels, the Macintosh had only 175,104 pixels. The numbers do not lie. The Amiga had 80,896 MORE pixels than the Macintosh. PAL mode offered even more pixels on the Amiga. You're just plain wrong.

FWIW, I also had both platforms, and vastly preferred the Amiga, not just for the higher screen resolution, but also the 4096 colors it provided vs. the 2 colors of the Macintosh. And the far better multitasking, stereo 14-bit sound, amazing games, AREXX, and a lot more. Mac was always way behind the Amiga, in every single way including resolution.

ghusbands · 7h ago
Stereo 14-bit sound didn't really happen until the 1990s and needs quite a lot of CPU time and careful hacking, as Amiga sound chips are 8-bit, 4-channel. 4096 colors via weird hold-and-modify modes was never useful outside of demos and vanishingly few games. Nobody used 640x400 because interlacing was far too flickery, and such resolutions certainly didn't support 4096 colors.

The Amiga was ahead of its time in many ways, and the pre-emptive multitasking was fantastic, but claiming it was some paragon doesn't help anyone. If you wanted a fun home machine attached to a TV, it was great. Even a fun home machine attached to a monitor. If you wanted a business machine with a monitor, it wasn't the safest or best choice, if only due to a lack of software.

leptons · 5h ago
The Amiga 1000 can do 14 bit stereo sound. What did the Mac have? Oh, single-channel 8-bit. It doesn't matter if it took all the CPU to do it, the mac simply was not capable of coming anywhere close to Amiga in terms of graphics or sound. The standard Amiga sound capabilities were 4-channel stereo 12-bit, which was still light years ahead of Apple.
icedchai · 8h ago
The Mac’s screen was flicker free. Almost nobody used any Amiga any higher than 640x200 (640x256 PAL) unless they had special hardware (“flicker fixer”.)

That being said I preferred the Amiga.

leptons · 5h ago
A "flicker fixer" cost $100. A macintosh with 2-bit lower resolution graphics cost $1000 more than the Amiga. The Amiga was a bargain. And I don't remember interlace modes being that bad, honestly.
icedchai · 2h ago
Early Macs weren't even 2-bits, they were 1-bit: black or white!

The Amiga was a bargain in comparison, but it was not without its flaws, like all early machines. I had an A500 with a 1084 monitor, and the flicker at high res was bothersome to me. I later upgraded to an A3000 w/VGA monitor, and it was a vast improvement. I ran at 640x400 for everything at that point.

I think you are underestimating the price of "flicker fixers" at the time. I looked up the price of a Microway flicker fixer in an old Amiga World from 1988: Over $500. You also had to add an a VGA monitor: another $400.

zozbot234 · 13h ago
> My Amiga 1000 ran rings around the Macintosh with the same CPU, because it had custom co-processors

And the earliest ARM machines ran rings around the Amiga because they had a custom-designed RISC CPU, so they could dispense with the custom co-processors. (They still cost a lot more than the Amiga, since they targeted the expensive education sector. Later on ARM also got used for videogame arcades with the 3DO.)

bitwize · 10h ago
Want to give an Amiga user an orgasm? Fuck them gently and at the right moment, nibble their ear and whisper the words "custom chips" into it.

By contrast, there's a story about some Microsoft engineers taking a look at the Macintosh and asking the Apple engineers what kind of custom hardware they needed to pull off that kind of interface. The Apple guys responded, "What are you talking about? We did this all with just the CPU." Minds blown.

The designers of the Mac (and the Atari ST) deserve mad credit for achieving a lot with very little. Even though, yes, the Amiga was way cooler in the late 80s.

fractallyte · 3h ago
And the Amiga was faster than the Mac when emulating a Mac.

I know this first hand, because I got my first email address with CompuServe, running their software under emulation, while using my Amiga's dial-up modem. (I had to sneak the Mac ROM images from the computers at school...)

o11c · 10h ago
A lot of this really seems dishonest.

"no dynamic linking" (by implementing dynamic linking)

"no zombies" (as long as your programs aren't buggy)

I fail to see any meaningful distinction from what we have today. If it was more reliable, it was due to being smaller in scope and with a barrier to entry.

icedchai · 8h ago
Not to mention any errant program could easily take down the OS because there was no memory protection. Amiga users quickly became familiar with the “guru meditation” screen, which was the system’s BSOD.
jrmg · 9h ago
“Microkernel” (but everything’s in the same address space)
o11c · 3h ago
There is an important distinction between "one address space" and "one set of memory permissions". The former is usually a good idea (for debuggability if nothing else!) if you don't need to support `fork`; the latter is the problem.

On modern Linux systems you can even do separate sets of memory permissions within a single process (and single address space), with system calls needed only at startup; see `pkeys(7)`.

https://www.man7.org/linux/man-pages/man7/pkeys.7.html

(note however that there aren't enough pkeys available to avoid the performance problem every microkernel has run into)

ghusbands · 7h ago
I don't think there's intentional dishonesty in it - the author is just biased to seeing everything Amiga very positively.