OldSkool Koding – more detail
May 8, 2025OldSkool Koding – Anyone Remember 68000?
Posted on May 8, 2025
Starting the Journey: Claude and the Amiga 68020
Let’s dive right in — this all began with me asking Claude (Anthropic’s Claude 3.5 Sonnet) to write code that opens an Intuition window on the Amiga 1200 using 68020 assembly language.
🧠 A Bit of Background
For those too young (or unfamiliar) with what I mean: Back in the late ’80s and early ’90s, Commodore’s Amiga computers were revolutionary. These 16-bit machines came loaded with a Motorola 68k CPU and dedicated custom chips for graphics, sound, I/O, and even the base OS (Kickstart). Each component did its job independently — making the Amiga years ahead of its time.
The Amiga family included models like the A500, A600, A1200, A1000, CDTV, CD32, and more. Later versions like the A1200 ran on the 68020 processor.
The main GUI was called Workbench, a desktop environment not unlike early Windows:
These machines still have a cult following among retro computing enthusiasts (myself included).
🛠 The Challenge
I tasked Claude with generating Motorola 68020 assembly code that would:
- Open an Intuition window
- Display the title “Hello Amiga”
- Exit cleanly when the close gadget is clicked
This isn’t some simple high-level app. We’re talking about low-level memory structure manipulation — on a system where every byte counts.
💬 The Conversation with Claude
Me:
Write an Amiga 68020 assembler program to open an Intuition window with a few gadgets. It must terminate when the close gadget is pressed.
Claude:
Certainly! Here’s a breakdown of how such a program works…
And from there, the journey began. Claude produced plausible code, but it wasn’t plug-and-play — there were redefinition errors, undefined symbols, Guru Meditations, and more.
🤖 Debugging AI-Generated Assembly
Claude tried using constants like WINDOWCLOSE
, which conflicted with system-defined ones. We fixed that by either renaming constants or — more sensibly — removing them and relying on the system headers.
Then came LVO issues (library vector offsets like _LVOOpenLibrary
) which Claude initially forgot to define. Fixing that required adding offsets manually or using the correct includes from the Amiga developer kit.
Eventually, I hit a Guru Meditation (#80000003) and had to completely simplify the window structure, strip out gadgets, and add them back cautiously.
🧪 Trial, Error, and Learning
What followed was a deep dive into:
- Whether
ReplyMsg
is necessary (spoiler: some examples omit it) - How
GetMsg
and IDCMP flags interact - Correct memory alignment and PC-relative addressing
- Whether signal handling was even required
Eventually, the window opened — and the close gadget worked!
Success didn’t come from just pasting prompts into an AI. It required:
- Manual error interpretation
- Researching Amiga dev resources (e.g., Amiga Spirit Wiki)
- Coaching the AI step-by-step until we got results
🧩 Bonus: With Context, Results Improve
I tried re-running the same prompt — but this time I fed Claude that Amiga dev wiki as reference material. The results were significantly better. It followed the expected layout, used correct addressing, and only needed minor syntax tweaks.
Lesson: If you want great output from an AI, feed it great context.
🧵 Final Thoughts
Yes, AI helped me write a full 68020 assembler program. But it wasn’t “set and forget.” It was a collaboration — a human steering an AI assistant through retro computing quirks.
I didn’t write any assembler myself. I directed the AI, researched fixes, and debugged the output.
And that’s the takeaway: AI isn’t a replacement for skill — it’s a multiplier. Give it knowledge, and it gives back power.