Dunno. They tell me XP lets you do this... but I don't run XP. I think you'll have to read your data into a buffer, and just display what *will* fit on the screen. Scrolling down is easy. Scrolling back up, not so much. Backing up through the buffer, counting CRs and/or LFs is the only way I've been able to do it - not really too satisfactory (especially if some of your lines "wrap" and a newline might represent more than one screen line). What OS is this for? How do you get keystrokes? Can you get by with a "more" style thing that just displays 25 lines and waits for a key? Or do you really have to scroll back up? There's no "scroll" instruction, so whatever you do will have to be very OS-specific...
Best,
Frank