DEV Community

Discussion on: I coded in assembler on the Commodore Amiga in the early 90s, ask me anything!

 
bertilmuth profile image
Bertil Muth • Edited

What btst #6, $bfe001 does is: check whether bit 6 of the value at address $bfe001 is set.

$bfe001 is the hexadecimal address of a hardware register of the Amiga.
It is a fixed value - so that hardware register is always addressable by $bfe001.

The value you get when you read that register contains an information at bit number 6. When bit 6 is set, the left mouse button is pressed, otherwise not.

Does that help? I assumed you know about the hexadecimal system and bits...

Thread Thread
 
jokyspy profile image
Hiep Le

Wow thanks! That makes sense. I assume code back then must have a lot of comments to explain these kinds of stuff.

Thread Thread
 
bertilmuth profile image
Bertil Muth

Yes, indeed.