If you’re looking to learn Motorola 680×0 Assembler for the Amiga computer and compatible systems like Apollo’s Vampire or Unicorn, you’ve come to the right place. This site offers a variety of resources for anyone interested in low-level coding.
To follow along, make sure your developer tools are set up and installed on your computer. For more details on how to do that, please see:
LINK
LINK
Now that you’re ready, let’s jump right in. I can guess what you’re thinking—another “Hello World” code example to kick off learning a new programming language.

In the Amiga world, we do things a bit differently. Here, we start by learning how to read input from the mouse’s left button, of course.
waitLoop:
btst #6,$bfe001
bne.s waitLoop
rts
Now compi….. assemble the code, and run it. It will loop continuously until you click the left mouse button.
Let’s break it down and go over what each part means.
waitLoop:
This is a label, essentially a bookmark in the code pointing to this location. It’s not an instruction for the CPU, but a marker for the assembler to reference when generating actual machine code.
Labels must either end with a colon or be placed at the start of a line with no space before them to be recognized by the assembler, and they are case-sensitive.
btst #6,$bfe001
The “btst” instruction, short for “Bit Test,” is a real CPU command. Here, it’s checking bit number 6 at the memory address $bfe001. The outcome of this test is saved in the CPU’s Condition Code Register (CCR). Essentially, it’s used to determine if that specific bit is set to zero.
On the Amiga hardware platform, the system sets this particular bit to zero when the LMB is pressed; otherwise, it’s set to one.
bne.s waitLoop
BNE stands for “branch if not equal,” meaning that if the previous test doesn’t result in zero, the program jumps to the label waitLoop. You might have noticed the “.s” after BNE—this is an optimization, where “.s” means short. It’s used to create smaller code when the branch or jump is to a nearby address.
rts
RTS stands for “Return to Subroutine.” When our program is called by the operating system, we need the CPU to resume executing the OS’s own instructions; otherwise, the system will crash. In later articles, we’ll use the RTS command extensively when creating our own functions and subroutines.

There you have it—your first Amiga program, written in the programming language for hardcore bearded or bald guys. And if you happen to be a gal, you’re, of course, welcome to be a little less hairy.
