Okay, so I thought about approving you HM thread, but I found a few things I didn't like:
-You don't account for the ram used to store your TMs/HMs in the bag. There is a malloc set up that designates a specific size ram area for them.
-Compatibility is a 16bit bitfeild with TMs and HMs in order, right after one another. Take that as you please. (Mind you, each entry is 8 bytes, or 64 bits. You would only need to repoint if you included more than 6 hms.)
-You don't account for the actual TM&HM table that holds all of the moves. This would need to be expanded and dealt with.