How do you get up the endless stairs on Super Mario 64 for Nintendo 64?

Once you have 70 stars, the staircase is no longer endless and you reach the door at the top.

Or the long jump trick to reach the top of the staircase without 70 stars is:

Do a long jump away from the stairs, then tilt the control stick up. Mario should still be doing long jumps and facing you, but at the same time going up the stairs instead of down. Press the jump button as fast as you can, and Mario will eventually make it up the stairs.

P.S.-- in the DS version the only way to do it, if even possible is to use a mod like action replay to have all the stars {in which case you will already have 70} so there is absolutely no way to do it becasue DS makes it impossible

(source)