Make the most of compiled C loops on the 68000

The other day I was working on my pet project ngdevkit , an open source C development kit for the Neo Geo hardware. I needed to write a simple clear_screen function, and I chose to do it in C for simplicity, in the hope that this would get efficiently compiled into 68000 assembly. That apparently innocuous task led me to some interesting findings regarding gcc, binutils, and how you can hint the…