Like the original SMW Hammer Bro., he sits there, throwing hammers. He will stay where ever you place him, so you can put him on top of ? blocks, and hitting them from below kills him. The cool thing is that he won't "lock" onto the gray blocks if there are any.
PM me if you find any major errors when using this sprite. No credit needed.
Ohhh thats what you meant... The locking onto the platform is actually handled by the platform and not by the sprite. I don't know what you want to do but this technically is the disassembly.
l: LDA $14C8,y
f: LDA $00E4,y
SEC : SBC #$10
put that after the "HammerBro" label and it should lock onto the platform.