home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / cache.lbr / CACHE.DZC / CACHE.DOC
Encoding:
Text File  |  1993-10-26  |  5.4 KB  |  151 lines

  1.  
  2.                         CACHE.COM
  3.  
  4.         A memory cache facility for the KAYPRO II.
  5.  
  6.                    By Steve McMahon
  7.        For the Bay Area Kaypro Users & Programmers.
  8.                   February 26, 1983
  9.  
  10.  
  11.                       INTRODUCTION
  12.  
  13.     One of the oft-cited failings of CP/M is its lack of any
  14. way to `redirect' output intended for a logical device such as
  15. the list device or console to a disk file.
  16.  
  17.     The uses of such a redirect feature would be manifold. 
  18. Transcripts of console operations could be kept, directory
  19. reports could be included in text files, Word Processor output
  20. could be saved in a disk file for special modification, etc.  The
  21. ability to save the output of Perfect Printer in a disk file
  22. would allow the insertion of special graphics characters
  23. otherwise unavailable when redirection was used in conjunction
  24. with a text editor.
  25.  
  26.     A memory cache provides one way to get this type of
  27. redirection. The idea is to reserve a chunk of RAM out of the way
  28. of anything else and to make it into the logical LIST device. 
  29. All list output will then be stored in the cache.  Console output
  30. may also be placed there by using a ^P to cause console output to
  31. be echoed to the LIST device (the memory cache).  However, some
  32. scheme must then be devised to get the cache into a disk file.
  33.  
  34.     CACHE.COM does just these things.  The program overlays
  35. the Basic Input Output System (BIOS) of a 56k version of KayPro
  36. CP/M with a BIOS altered to create and control a cache in the top
  37. 8k of RAM.  (Using a 56k version of CP/M leaves this area
  38. unused by the system, allowing its use for the cache.)
  39.  
  40.     To use CACHE, you will have to use MOVCPM.COM and
  41. SYSGEN.COM to create a 56k version of CP/M on disk.  The new
  42. version of CP/M must actually be installed on disk.  Though
  43. MOVCPM will allow you to create and immediately run a 56k version
  44. without writing it onto a disk, this will not work with CACHE! 
  45. (Because when working this way MOVCPM is actually invoked at each
  46. warm start to reinstall a whole new BIOS.  It overwrites the
  47. cache BIOS.)
  48.  
  49.  
  50.              PUTTING A 56K VERSION OF CP/M ON A DISK
  51.  
  52.     The following is a sample transcript of an installation
  53. of a 56k version of CP/M on the disk on drive B:, using programs
  54. on a disk in A:.  The disk in drive A: is unaffected, the B: disk
  55. will become the cache operating disk.
  56.  
  57.  
  58. -----------------Transcript of 56k installation----------------
  59. A>
  60. A>movcpm 56 *
  61.  
  62. CONSTRUCTING 56k CP/M vers 2.2
  63. READY FOR "SYSGEN" OR
  64. "SAVE 34 CPM56.COM"
  65.  
  66. Warm Boot
  67.  
  68. A>sysgen
  69. KAYPRO SYSGEN VER 2.2
  70. SOURCE DRIVE NAME (OR RETURN TO SKIP) {Enter a return here}
  71. DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b {enter b for B: drive}
  72. DESTINATION ON B, THEN TYPE RETURN {Another return here}
  73. FUNCTION COMPLETE
  74. DESTINATION DRIVE NAME (OR RETURN TO REBOOT) {Yet another return here}
  75.  
  76. Warm Boot
  77.  
  78. A>
  79. --------------------End Transcript------------------
  80.  
  81.     You will probably also wish to put CACHE.COM on the 56k
  82. CP/M disk.
  83.  
  84.  
  85.               USING CACHE.COM TO FILE LIST OUTPUT
  86.  
  87.     The 56k CP/M disk must be placed in A: and cold booted
  88. (push the reset button).  The cache may then be installed as
  89. simply as typing CACHE {RETURN}.  The program will notify you if
  90. the overlay is successful.  As a reminder of the modified BIOS's
  91. presence, warm boots will be signalled by "Reloading" rather than
  92. "Warm Boot".
  93.  
  94.     Now, any output directed to the LIST device will instead
  95. go to the cache.  Typing ^P at the console will toggle on and off
  96. the LIST echoing of what goes on the CRT screen -- whatever
  97. happens between ^P's will be saved in the cache (It will not go
  98. to the printer!).
  99.  
  100.     If you over-run the 8k of buffer, the console bell will
  101. sound and the cache will reset itself.  Earlier cache contents
  102. will be lost, but nothing dreadful happens to the operating
  103. system or whatever your working on.
  104.  
  105.     The cache resets itself with each warm boot.  On
  106. receiving a warm boot command (such as a ^C or the end of a
  107. program), the cache BIOS will move the memory cache to the
  108. Transient Program Area (TPA) beginning at 100H and will indicate
  109. in pages of 256 bytes (100H) how much has been saved.
  110.  
  111.     The output may now be saved in a disk file with the CP/M
  112. resident command SAVE.  Note that SAVE expects the number of
  113. pages to be saved in DECIMAL, while the console report is in
  114. HEXADECIMAL.  (Sorry about that, I was too lazy to write a
  115. conversion routine.)
  116.  
  117.     So, if you received the report:
  118.  
  119. --------------------------------------------
  120.  
  121. Reloading
  122. 0DH pages saved beginning at 100H
  123.  
  124.  
  125. A>
  126.  
  127. --------------------------------------------
  128.  
  129. and wished to store the fruits of your labor in a file
  130. B:MYDOC.FIL, you should enter the command:
  131.  
  132. SAVE 13 B:MYDOC.FIL
  133.  
  134.     (Note that 13 is the decimal form of 0DH.  If base
  135. conversion does not come easy to you, there are tables available
  136. to make the conversion.)
  137.  
  138. NOTE THAT ONCE A WARM BOOT HAS OCCURRED AND A SAVE NOTE HAS BEEN
  139. RECEIVED AT THE CONSOLE, RUNNING ANY TRANSIENT CP/M PROGRAM
  140. BEFORE SAVING TO A DISK FILE WILL CAUSE THE LOSS OF WHAT HAS BEEN
  141. SAVED IN RAM.  (Note also that this is an exaggeration: if you
  142. know how to use DDT you may recover the actual cache from 0DE00H
  143. on, move it to the TPA and save it.  There are nearly always ways
  144. to recover if you know what to do.)
  145.  
  146.     Parts of CACHE are loosely derived from programs
  147. described in Alan R. Miller's MASTERING CPM (SYBEX, 1983).
  148.  
  149. Steve McMahon
  150. Berkeley
  151.  f y