The honest answer is that you can't reach the top of the Endless Stairs in Super Mario 64 DS without collecting 80 stars. The staircase is designed to loop endlessly until you've met that requirement.
Once you hit 80 stars, the stairs stop looping and you'll be free to climb all the way to the top. Until then, no clever trick will get you past it.