home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / c128 / text / examples.arc / MEMMAP.TXT < prev    next >
Encoding:
Text File  |  1989-12-01  |  3.5 KB  |  86 lines

  1.  
  2.                 C128 Memory Map for CS-DOS
  3. -------------------------------------------------------------------------------
  4. Bank 0
  5. -------------------------------------------------------------------------------
  6.  
  7. $0000-1FFF      8K common RAM
  8.  
  9. $0000-00FF      Shell zero page usage consists of:
  10.  
  11.                 $0016 - two bytes
  12.                 $0024 - six bytes
  13.                 $005d - six bytes
  14.                 $00ce - two bytes
  15.  
  16.                 As well as those locations nessessary to communicate with
  17.                 the KERNEL ROM.
  18.  
  19. $0100-03FF      Some vectors are changed (iload, isave etc)
  20.  
  21. $0400-07FF      CS-DOS normally assumes that you're using an 80 column VDC
  22.                 screen and therefore some commands will use the 40 column
  23.                 screen as scratch pad memory. The shell does not do this.
  24.                 If you want to use the 40 column screen, you'll have to
  25.                 avoid those commands which use this area.
  26.  
  27. $0800-0AFF      Not used
  28.  
  29. $0B00-0EFF      Small commands which fit in this area will run here. Since
  30.                 this is common RAM, its easier to code them to run here and
  31.                 they will execute faster since there is less overhead involved
  32.                 in switching banks in and out.
  33.  
  34. $0F00-12FF      Not Used
  35.  
  36. $1300-16FF      Scratch pad area used by some commands.
  37.  
  38. $1700-1BFF      Reserved. Some of the shell code and data resides here.
  39.  
  40. $1C00-FFFF      Large commands like ARC or LHA will run here. Usually $C000
  41.                 and above is left alone, but not always. If you want to stick
  42.                 a RAM disk in bank 0, you'll have to avoid those programs which
  43.                 use $C000 and above. (Currently only ARC128)
  44.  
  45. -------------------------------------------------------------------------------
  46. Bank 1
  47. -------------------------------------------------------------------------------
  48.  
  49. $0000-03FF      Buried under Common RAM. Not used.
  50.  
  51. $0400-1FFF      Buried under Common RAM. Used by the shell for i/o buffers etc.
  52.  
  53. $2000-3FFF      The main portion of the shell resides here.
  54.  
  55. $4000-FAFF      Not used by the shell, but may be used by various commands.
  56.  
  57.                 In most cases no memory is used above the address pointed to
  58.                 by max_mem_1 ($0039) since presumably a RAM disk may reside up
  59.                 there. However, this isn't always possible. LHA for example
  60.                 needs to use all of bank 1 and won't adhere to this.
  61.  
  62. $FB00-FEFF      RS232 input buffer.
  63.  
  64. -------------------------------------------------------------------------------
  65. Commands
  66. -------------------------------------------------------------------------------
  67.  
  68. Most of the small commands, the ones that execute at $0B00-0EFF don't use any
  69. RAM outside the range $0B00-0EFF. The ones that need additional RAM (copy and
  70. move for example) will use $4000-(max_mem_1) in bank 1, or use the 40 column
  71. screen at $0400-07FF.
  72.  
  73. Larger commands, like ARC and so on, vary in how they use memory. Whenever
  74. possible, $C000 and above is avoided in both banks so as to allow for a small
  75. RAM disk in the 128. When this is not possible, it will be noted in the
  76. documentation for the command. Such commands will be usable only by people with
  77. 1750's or by disabling any internal RAM disk that gets in the way.
  78.  
  79. Since the vast majority of people that purchased CS-DOS have 1750's, I suspect
  80. the shell's support for an internal RAM disk will be removed if and when the
  81. shell is updated.
  82.  
  83.  
  84.  
  85.  
  86.