Routine to Print Free Bytes

By Bob Huelsdonk

Only line 30001 is required for less than 32K of Memory.  The first GOTO 30000 shows result with  greater than 32K of Memory. The second GOTO 30000 shows the result with less than 32K of memory.

30000 IF PEEK (203)>128 THEN 30002
30001 PRINT PEEK (202)+ PEEK (203)*256- PEEK (204)- PEEK (205 )*256;” BYTES FREE”: END
30002 PRINT 32767-( PEEK (204)+ PEEK (205)*256);” BYTES + “; PEEK (202)+( PEEK< (203)-128)*256 +1;” BYTES FREE”: END

>GOTO 30000

30719 BYTES + 16226 BYTES FREE
>GOTO 30000


Please follow and like us:

About the Author

Bill Martens

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.