home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / CPM3 / BANKSWAP.LBR / BANKSWAP.DOC < prev    next >
Text File  |  2000-06-30  |  4KB  |  97 lines

  1.                  BANKSWAP: 
  2.         A Banked Memory Debugging Tool for CP/M Plus
  3.  
  4.              Albert S. Woodhull
  5.              Hampshire College
  6.              Amherst, MA 01002
  7.  
  8.          Copyright 1985, Albert S. Woodhull
  9.  
  10.     The BANKSWAP.LBR file contains, in addition to this READ.ME
  11. file, the source, BANKSWAP.ASM, and RSXMAKER.SUB, which can be used
  12. to control the process of assembly, linking, and attaching the
  13. resident system extension to an executable file.
  14.  
  15.     A complete description of the program was published in Dr.
  16. Dobb's Journal, Volume 10, Issue 12, December 1985, on pages 34-52.
  17. The following text is abstracted from that article:
  18.  
  19.          BANKSWAP   is  not   a   standalone 
  20.     program; it is an  enhancement to SID or 
  21.     DDT that provides additional commands to 
  22.     copy blocks of memory from bank to bank.  
  23.     The normal functions of the debugger can 
  24.     be used on a copy of memory from another 
  25.     bank  that  has been brought to the  TPA 
  26.     bank.
  27.     
  28.          BANKSWAP is relocatable, and is not 
  29.     necessarily loaded to the same  location 
  30.     each  time it is used.   For ease of use 
  31.     BANKSWAP  installs a vector to  its  own 
  32.     entry  point at the RST 5 location (28H) 
  33.     during installation.   Typing "G28" from 
  34.     the  SID  or DDT prompt  brings  up  the 
  35.     BANKSWAP   menu.    The   initialization 
  36.     process   also  displays  a  message  to 
  37.     remind  the  user  of  the  presence  of 
  38.     BANKSWAP and the command to access it.
  39.     
  40.          The  BANKSWAP menu allows choice of 
  41.     the  direction of the move,  the  memory 
  42.     addresses    for    the    source    and 
  43.     destination, and the length of the block 
  44.     to be moved.  The menu also provides for 
  45.     easy return to DDT or SID,  and for  the 
  46.     eventual removal of BANKSWAP. 
  47.     
  48.          The listing contains comments  that 
  49.     explain the operation of BANKSWAP, but I 
  50.     will  emphasize  a  few points  I  found 
  51.     important in working with banked memory.  
  52.     Although I wrote this program for use on 
  53.     an Apple with the A.L.S. CP/M Card there 
  54.     should be no problems in making BANKSWAP 
  55.     work  on other implementations  of  CP/M 
  56.     Plus.  The  most critical point is to be 
  57.     sure that control is not lost while bank 
  58.     1  is deselected.  This  means  ensuring 
  59.     that BANKSWAP itself, the stack, and all 
  60.     data  areas  used are located in  common 
  61.     memory.   It is possible for a CP/M Plus 
  62.     system  to be constructed so  interrupts 
  63.     and  system calls can be  handled  while 
  64.     alternate banks are selected.   However, 
  65.     for  insurance  I  thought  it  best  to 
  66.     disable  interrupts  and avoid calls  to 
  67.     the standard BDOS entry point while bank 
  68.     1  is deselected,  since the vectors  on 
  69.     page 0 of bank 1 are then inaccessible.
  70.     
  71.          There  is a potential problem  with 
  72.     the version of BANKSWAP shown in listing 
  73.     1,  but  I leave it for someone else  to 
  74.     fix.   As noted above, BANKSWAP uses the 
  75.     RSX  technique in order to be located at 
  76.     the highest available meory address. The 
  77.     actual  amount  of high memory  that  is 
  78.     common  depends upon the hardware  used, 
  79.     and  I  didn't figure out a  way  for  a 
  80.     program to determine this.   If too many 
  81.     RSXs are installed, the top of available 
  82.     memory  can be below the common  region.  
  83.     In  this  case  BANKSWAP  will  probably 
  84.     cause a crash.   On my Rev.  A CP/M card 
  85.     the  common  memory limit is  at  8000H, 
  86.     ahich leaves room for a lot of RSXs,  so 
  87.     I  have never given the problem  a  high 
  88.     priority. 
  89.  
  90.     The BANKSWAP.LBR file is being uploaded to the CompuServe
  91. CP/M SIG on December 15, 1985.  The author can be reached by EMAIL
  92. to 74156,1067 on CompuServe, or by mail to the address at the
  93. beginning of this file.  He would appreciate being informed of
  94. further distribution of these files.
  95. m  with 
  96.     the version of BANKSWAP shown in listing 
  97.     1,  but  I leave it for someone els