home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 23 / 023.d81 / t.memgraph.bas < prev    next >
BASIC Source File  |  2022-08-26  |  3KB  |  182 lines

  1.  
  2.  
  3.               MEMGRAPH
  4.                  by
  5.            R. Harold Droid
  6.  
  7. COMMODORE POWER/PLAY MAGAZINE
  8. April/May, 1986
  9. p.93
  10.  
  11.   The hallmark of a good program is
  12.  
  13. its efficiency-- how well it makes
  14.  
  15. use of the computer's memory.
  16.  
  17. MEMGRAPH is a utility that shows a
  18.  
  19. graphic representation of how much
  20.  
  21. memory a program takes up and how it
  22.  
  23. uses that storage space.
  24.  
  25.  
  26.   To see how MEMGRAPH does this, we
  27.  
  28. must first remember that in the
  29.  
  30. Commodore 64, BASIC divides its
  31.  
  32. available space into five sections:
  33.  
  34. program text, variables, array
  35.  
  36. variables, free space, and string
  37.  
  38. space.  MEMGRAPH shows the relative
  39.  
  40. amount of memory taken up by each of
  41.  
  42. these five sections.
  43.  
  44.  
  45.   The graph of this data is a grid of
  46.  
  47. blocks: each filled block represents
  48.  
  49. 256 bytes.  The type of information
  50.  
  51. represented by the block is shown by
  52.  
  53. its color.  For example, 256 bytes of
  54.  
  55. program text will be repesented by
  56.  
  57. a certain color while other sections
  58.  
  59. are represented by other color codes.
  60.  
  61.  
  62.   Seeing the relationships between
  63.  
  64. these sections can tell you a great
  65.  
  66. deal about the efficiency of your
  67.  
  68. programs.
  69.  
  70.  
  71. USING MEMGRAPH....
  72.  
  73.   When MEMGRAPH is loaded, a machine
  74.  
  75. language file is created.  Loading
  76.  
  77. this file changes the BASIC pointers,
  78.  
  79. so you must type NEW to reset them.
  80.  
  81. Then, entering SYS 51456 will
  82.  
  83. activate MEMGRAPH.
  84.  
  85.  
  86.   Pressing the SHIFT and RESTORE at
  87.  
  88. the same time will send you to the
  89.  
  90. graph screen.  Pressing the SHIFT key
  91.  
  92. will return you to the previous
  93.  
  94. screen where you can load the program
  95.  
  96. you want graphed.
  97.  
  98.  
  99.   While you are running this program,
  100.  
  101. pressing SHIFT/RESTORE at any time
  102.  
  103. will return you to the graph screen.
  104.  
  105. If you return to the graph screen
  106.  
  107. before actually running the program,
  108.  
  109. only the program text blocks will be
  110.  
  111. filled.
  112.  
  113.  
  114.   When you press SHIFT/RESTORE after
  115.  
  116. running a program, you will see a
  117.  
  118. color coded repesentation of the
  119.  
  120. storage used by your program.
  121.  
  122.  
  123.   To deactivate MEMGRAPH, press the
  124.  
  125. RUN-STOP/RESTORE combination.  If
  126.  
  127. there has been no power-down,
  128.  
  129. entering SYS 51456 will reactivate
  130.  
  131. it.
  132.  
  133.  
  134. NOTE: The MEMGRAPH graph is designed
  135.  
  136. for use on a color monitor, thus it
  137.  
  138. does not look that good on a black
  139.  
  140. and white monitor.
  141.  
  142.  
  143.   You may, however, alter the program
  144.  
  145. for a black and white monitor.  Load
  146.  
  147. and run MEMGRAPH.BAS to get a copy of
  148.  
  149. MEMGRAPH on the disk.  Then load the
  150.  
  151. MEMGRAPH.MOD program and change the
  152.  
  153. data statements to change the color
  154.  
  155. of the graph so that it looks good on
  156.  
  157. your screen.  After modifying the
  158.  
  159. program, run it and it will save a
  160.  
  161. copy of MEMGRAPH.B/W onto your disk.
  162.  
  163. This program will reflect only those
  164.  
  165. changes you have made.
  166.  
  167.  
  168.   For more information on the ins and
  169.  
  170. outs of MEMGRAPH, consult Droid's
  171.  
  172. article cited at the beginning of
  173.  
  174. this file.
  175.  
  176. FILES REQUIRED:
  177.  
  178. MEMGRAPH.BAS
  179.  
  180. ----------<end of text>--------------
  181.  
  182.