
                C128 Memory Map for CS-DOS
-------------------------------------------------------------------------------
Bank 0
-------------------------------------------------------------------------------

$0000-1FFF      8K common RAM

$0000-00FF      Shell zero page usage consists of:

                $0016 - two bytes
                $0024 - six bytes
                $005d - six bytes
                $00ce - two bytes

                As well as those locations nessessary to communicate with
                the KERNEL ROM.

$0100-03FF      Some vectors are changed (iload, isave etc)

$0400-07FF      CS-DOS normally assumes that you're using an 80 column VDC
                screen and therefore some commands will use the 40 column
                screen as scratch pad memory. The shell does not do this.
                If you want to use the 40 column screen, you'll have to
                avoid those commands which use this area.

$0800-0AFF      Not used

$0B00-0EFF      Small commands which fit in this area will run here. Since
                this is common RAM, its easier to code them to run here and
                they will execute faster since there is less overhead involved
                in switching banks in and out.

$0F00-12FF      Not Used

$1300-16FF      Scratch pad area used by some commands.

$1700-1BFF      Reserved. Some of the shell code and data resides here.

$1C00-FFFF      Large commands like ARC or LHA will run here. Usually $C000
                and above is left alone, but not always. If you want to stick
                a RAM disk in bank 0, you'll have to avoid those programs which
                use $C000 and above. (Currently only ARC128)

-------------------------------------------------------------------------------
Bank 1
-------------------------------------------------------------------------------

$0000-03FF      Buried under Common RAM. Not used.

$0400-1FFF      Buried under Common RAM. Used by the shell for i/o buffers etc.

$2000-3FFF      The main portion of the shell resides here.

$4000-FAFF      Not used by the shell, but may be used by various commands.

                In most cases no memory is used above the address pointed to
                by max_mem_1 ($0039) since presumably a RAM disk may reside up
                there. However, this isn't always possible. LHA for example
                needs to use all of bank 1 and won't adhere to this.

$FB00-FEFF      RS232 input buffer.

-------------------------------------------------------------------------------
Commands
-------------------------------------------------------------------------------

Most of the small commands, the ones that execute at $0B00-0EFF don't use any
RAM outside the range $0B00-0EFF. The ones that need additional RAM (copy and
move for example) will use $4000-(max_mem_1) in bank 1, or use the 40 column
screen at $0400-07FF.

Larger commands, like ARC and so on, vary in how they use memory. Whenever
possible, $C000 and above is avoided in both banks so as to allow for a small
RAM disk in the 128. When this is not possible, it will be noted in the
documentation for the command. Such commands will be usable only by people with
1750's or by disabling any internal RAM disk that gets in the way.

Since the vast majority of people that purchased CS-DOS have 1750's, I suspect
the shell's support for an internal RAM disk will be removed if and when the
shell is updated.




