Many games I know have this feature. One notable example is "The End is Nigh" in which you can control the height of your jumps depending on how long the button is held down.
I found one similar topic of somebody asking this, but it wasn't very helpful to me.
Does anybody know how to accomplish this? Seeing how this was a feature in the original Super Mario Bros, I reckon that this shouldn't be too hard considering that even the NES was able to support that feature. Thanks in advance.