Routine to find page length

This handy little subroutine can be used in two manners; to fill a screen page with repetitive material or to determine the length of a screen page of print statements. Assume line 100 is a print statement with which you wish to fill the page.

100 PRINT” “:GOSUB 400
400 IF PEEK(37) < 18 THEN RETURN
410 POP:PRINT “FOR NEW PAGE HIT ANY KEY”:CALL 756:GOTO 000

Line 400 reads the cursor and finds whereitis on the page. If less than 18 lines, print more lines. Line 410 “Pops” the return address from the stack. Instead of Call 756 you could use INPUT A$ or Call -676, all of which are a means of halting the program to await further instructions.

Please follow and like us:

About the Author

billm

A.P.P.L.E. Chairman of the Board and Club president — Bill worked for the founder, Val J. Golding and A.P.P.L.E. from 1981 to 1982. In 1999, he began archiving the materials which were distributed and sold by A.P.P.L.E.. That project led to the group that remained of A.P.P.L.E. Bill was involved in the financial industry in Tokyo and has over 20 major office infrastructure projects to his name. In March 2001, he retired to write books and to spend more time pursuing personal interests. As the president of the users group, Bill is in charge of distribution of Call-A.P.P.L.E. magazine as well as the organization of this web site. Bill currently resides in Tokyo, Japan and Shelton, Wa splitting time between the places.