Inside BASIC the code has to keep a count of lines and wait for input every time 'n' lines have been output. The modulus operator is convenient for this. It returns the remainder of an integer division so 12 MOD 5 = 2, and 12 MOD 6 = 0.
Thus something like:
IF LineCount MOD 25 == 0 THEN INPUT "Return to continue", A
PRINT(Line)
Every 25th line, the program pauses until the operator presses the Enter key.
Alternatively, depending on the version, DOS probably supports pipe and more. The pipe symbol '|' connects the output of one program to the input of other. 'more' is a DOS pagination program. Try:
c:>myprogram.exe | more
Dave