Tip: Take advantage of easy to install Patches in your hack. The No More Sprite Tile Limits or SA-1 patches should be considered if you're encountering glitches where Mario and/or sprites are turning invisible.
I was asked for this very simple level ASM multiple times so I think it is a good idea to upload it.
All this does is set mario's position next frame to his position this frame if L is pressed. That means momentum is stored and can be gained even when locked. You can gain p-speed that way and change your direction midair.
You can die if you lock mario during an autoscroll as the screen will go past him.