                          DOS RAM DISC 
                                                      Brian Cowan

     In DOS it is possible to set up a RAM disc, and indeed for 
many applications it is vital if one does not have the luxury of 
a hard disc.  Now regular DOS supports a maximum of 640 Kbytes of 
RAM, athough we did learn about Extended Memory in last month's 
Archive.  The problem with a DOS RAM disc is that the memory is 
actually taken from the 640K system RAM.  At least it certainly 
is with current versions of the PC emulator.

DOS Partitions
     A few months ago an application appeared on the magazine 
disc called !PCRamDisc.  This made use of the fact that the PC 
emulator can support up to two "hard disc" partitions, and that 
one of these could be in the Archimedes RAM disc filing system. 
(In fact one of these can be on an ADFS floppy!).  In this way a 
large RAM disc can be used within DOS which does not take 
anything from the regulation DOS 640K.  This seemed a really good 
idea and I waseager to try it out.

Creation
     The program which produces the DOS partition is a variation 
of the Acorn program to construct a hard disc partition, but with 
the filing system and paths changed, and with the allowed 
partition sizes also changed to more convenient values.  Having 
created such a partition the !Run2 file must be modified to tell 
the machine where the partitions are.

     Then, when the emulator us run, the new "drive" must be 
initialized using FDISK and then formatted using FORMAT.  This 
part really annoyed me as I had to do it each time I used the 
emulator, and I would forget what to do.  

Lazy Approach
     It seemed a good idea to create a ready-formatted and 
initialized parition before entering the emulator.  I am sure 
someone could write a program to do this, but not me.  Obviously 
it would be silly to store, say, a 2 megabyte partition in 
readiness; this is just a waste of space.  However I discovered 
that an initialized, formatted, but otherwise empty DOS partition 
of one megabyte capacity could be compressed to just over a 
kilobyte using Archimedes ARC, a Public Domain file 
compression/decompression program written by David Pilling.

!PCRamDisk
     That is the basic idea.  On the magazine disc there is an 
application called !PCRamDisk (note the different spelling).  
This contains a compressed but empty DOS partition which is 
decompressed into the RAMFS before invoking the PC emulator.  
Please read the !Help file before using it as the !Run2 file of 
the emulator is overwritten when the application is run.

