Beruflich Dokumente
Kultur Dokumente
CONTENTS
1. Disclaimer of warranty
2. License
3. Features included
4. Files in this release
5. Usage
5.1. Basic installation
5.2. SRDISK device driver
5.2.1. XMS memory device driver
5.2.2. EMS memory device driver
5.2.3. EMS 3.2 memory device driver
5.3. SRDUMMY device driver
5.4. SRDISK program
5.4.1 SRDISK sample commands
5.4.2 SRDISK command line options
6. Troubleshooting
7. Trademarks
8. Last words
1. DISCLAIMER OF WARRANTY
THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS
TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER
EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE
ENVIRONMENTS IN WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS
FOR A PARTICULAR PURPOSE IS OFFERED.
2. LICENSE
This software is NOT free. A license fee must be paid if used longer
than for one month evaluation period. See PAYMENT.DOC for details of the
payment.
Everybody has the right to copy and distribute this software as long as
it is unmodified and all the original files listed in chapter 4 of this
document are included. A fee of at most $7 may be charged for the total
expences of copying. If a copying fee is taken, the receiver of this
software must be made aware that he has only the evaluation and copying
license stated above.
Remember that you may COPY THIS TO YOUR FRIENDS! This is the idea behind
shareware. Show this to your boss also (not meaning: if you do not count
him/her to your friends <g>). SRDISK can prove worth a few megabytes of
memory to you.
3. FEATURES INCLUDED
Users may find that the ability to resize is invaluable. Since some
programs can take best use of memory by directly using it while others
need a fast disk for temporary files, you can now have optimal
performance with both kinds of programs without the trouble of changing
configuration and rebooting.
The feature of being able to resize automagically when there is need for
it is currently not in my reach. FAT filesystem in DOS just was not
designed for it. There is some more explanation about it later in this
document.
5. USAGE
The following explains the installation and how to use both of these
parts.
The basic installation for XMS memory can be done following these steps:
3. Make sure you have HIMEM.SYS or some other XMS driver installed
in CONFIG.SYS before the following step.
DEVICE=SRDXMS.SYS
If you have EMS memory, then use file SRDEMS.SYS in place of SRDXMS.SYS
and make sure EMS 4.0 device driver is installed in CONFIG.SYS before
the SRDEMS.SYS.
The device driver adds into DOS a new disk drive. Before you run
SRDISK.EXE or when you set the disk size to zero, the new disk drive
behaves as if you have a floppy drive without a floppy inserted.
For a RAM disk you need a device driver. This device driver supplies a
storage for an array of sectors which DOS uses to store all the data.
SRDISK comes with separate drivers for storing the sectors in XMS
(extended memory managed by HIMEM.SYS or other XMS driver) and in EMS
memory.
Most often you do not need any parameters for the device drivers, but
the driver accepts two parameters:
The [] around the parameter mean it is optional; you must not type the
brackets.
Another use for 'd:' is to define into what SRDISK drive the
current driver is to be appended.
If you want the low part of your disk to use XMS and the high
part EMS memory, you can put these two lines into your
CONFIG.SYS
DEVICE=SRDXMS.SYS
DEVICE=SRDEMS.SYS /A
For this to work, the first device driver must have the extra
code to look into the next driver for more memory. Therefore the
first device driver must not be the small version SRDXMSS.SYS or
SRDEMSS.SYS.
Merely installing the driver gives you no RAM disk. It is as if you had
installed a floppy drive without putting a disk in the drive. For that
you need the SRDISK.EXE program.
The following chapters give some explanation about the different memory
types and explains reasons for the problems there are.
8088 processor instruction set can only access memory at addresses from
0 to 1048575 (1 megabyte) and memory above the address 1048575 is called
extended memory. i80286 had a new mode (protected mode) where the
instructions had a little different meanings and could be used to
address memory above the 1 megabyte limit.
When SRDISK (or any other XMS client) needs extended memory, it requests
it from extended memory manager (EMM) that follows the eXtended Memory
Specification. Most common and free such memory manager is HIMEM.SYS.
The EMM then tries to find available memory block (a contiguous range of
addresses available) that is as large or larger than the requested
memory block. If all of the available blocks are smaller than the
requested size, the request fails even if the available blocks would be
large enough when combined.
Since DOS and DOS programs still run in the 8088 mode where instructions
can not address memory beyond 1 megabyte limit, there is no way for them
to access the memory directly. XMS also defines service to copy memory
to and from the memory beyond the 1 megabyte limit.
Since 8088 could only address memory up to 1 megabyte, any memory added
had to be made to use the same addresses with already existing memory.
Some new hardware had to be added so that the memory occupying a range
of addresses could be switched with another block of memory.
Lotus/Intel/MicroSoft Expanded Memory Specification (LIM EMS) was
developed to provide standardized access to this memory for much the
same reason XMS was developed to provide access to extended memory.
EMS uses a 64K memory area divided into four separate 16K windows to
access the expanded memory. These windows show different 16K blocks of
EMS memory (called pages) as requested by the application.
EMS memory can also be simulated very efficiently with 386 virtual
memory. For example EMM386 uses this method to convert extended memory
into expanded memory.
EMS 3.2 is an older version of EMS. 4.0 is the currently most used one.
The main reason SRDISK has version 3.2 driver is that MS-Windows 3.1 has
a serious bug in the EMS protection it uses. Basicly with the EMS 3.2
driver you can access EMS disk that has been allocated before starting
MS-Windows but not one that is allocated inside DOS window. With the EMS
4.0 driver you can not access memory allocated before starting
MS-Windows but can well access memory that is allocated inside DOS
window.
In any case, MS-Windows will not allow any other process access the
disk allocated in another process.
DOS allocates drives in order from A to Z. The first drives A and B are
always used for floppy drives. If you have hard disks, drives from C up
are allocated to them by DOS before CONFIG.SYS is loaded. After all the
standard hardware drives have been assigned, DOS reads the CONFIG.SYS
and loads the devices found there. Each block device driver (a device
supplying only an array of blocks of data, like SRDISK) is assigned one
or more drive letters in the order they are in CONFIG.SYS. The device
drivers can not determine to which drives they get assigned.
SRDUMMY.SYS tells DOS it provides one or more block devices and thus
uses up some drive letters. There will not be any drives though, and if
you access the drives, you'll get the drive not ready error.
SRDUMMY.SYS takes one parameter: The drive letter the next block device
should be loaded to.
DEVICE=SRDXMS.SYS
DEVICE=SRDUMMY.SYS G:
DEVICE=SRDEMS.SYS
If you have one hard disk, the floppies and hard disk use letters A-C.
SRDXMS.SYS is then loaded to D and SRDUMMY.SYS uses drives E and F.
SRDEMS.SYS loads thus at G.
If you add a second hard drive, it will take drive letter D and
SRDXMS.SYS will then be at E and SRDUMMY.SYS use only drive F putting
SRDEMS.SYS to G again.
If you add a few more drives so that drive G is already in use before
SRDUMMY.SYS gets loaded, you will only get a warning message from
SRDUMMY.SYS and the SRDEMS.SYS will load at the next available drive
letter.
DR-DOS 6 seems not to allow access to drive letters after P: even with
LASTDRIVE=Z statement in CONFIG.SYS. So with DR-DOS you must avoid using
the last drive letters after P:.
The disk can be enabled by, for example, using command "SRDISK 1024"
which will make first SRDISK a 1024K disk. It can be disabled by making
it of size 0: "SRDISK 0".
You should include the command to enable the RAM disk into your
AUTOEXEC.BAT file.
Command
SRDISK 1024
- Sector is the basic unit of storage. It's size does not mean much, but
it has to be a power of 2 and no larger than 512 bytes.
- Cluster size tells in how large blocks the space is allocated. Larger
clusters mean smaller FAT (= File Allocation Table), but then even the
smallest file always takes at least that much space. Cluster can not
be smaller than one sector. A cluster is a collection of sectors.
- FAT is the table that holds information about each allocation unit,
cluster, on the disk. The information can be indication that the
cluster is free, or where the next cluster of the file is or that the
cluster is unusable. A disk only needs one FAT - though multiple
copies of it can be specified. Note that the other FATs are only
copies of the first one.
Command
SRDISK 1024 /O
does the same as the command 'SRDISK 1024' except the various disk
parameters are not calculated but instead the old parameters are used.
Command
SRDISK /F:1440
tries to create the disk to look like a real floppy disk. It also
defines some parameters that otherwise have no effect like media
descriptor, number of heads and sectors per track. These parameters have
no other function but to make it look like it is a real, physical disk -
which it is not. SRDISK drives are not accessible through BIOS, so some
diskcopy and utility programs can fail if used with SRDISK.
Command
reformats the disk. The size is determined by the old size of the disk
even without the use of /O. Sector size is changed to 256 bytes, cluster
size to 1024 bytes (two sectors) and root directory will hold 64 entries
(one of which is used for the volume label).
Command
SRDISK /U
Command
SRDISK E:
Command
SRDISK
without the drive letter specified tries to determine the drive by first
trying the current drive and if it is not a SRDISK drive, then the first
SRDISK drive loaded in CONFIG.SYS. As no change in the format is
defined, the current configuration of the found drive are displayed.
5.4.2. SRDISK COMMAND LINE OPTIONS
To ease remembering the command line options, SRDISK has for some
settings several different options. Many of the options are long, but
you can truncate them if you write enough for SRDISK to identify the
option unambiguously.
All numeric parameters for the options are translated using the C
language rules: Number starting with 0 is octal number (base eight) and
with 0x is hexadecimal (base 16), others are decimal.
/? /H /HELP
/A:n /FATS:n
Number of FAT copies (1 or 2). You need only one FAT unless you
need to make the disk look like some floppy disk.
/AVAILABLE:n /MINSIZE
/MINSIZE is the same as /AVAILABLE:0 and will also make the root
directory smaller.
/C:n /CLUSTER:n
/D:n /DIRENTRIES:n
Root directory entries. FAT file system has fixed size root
directory. You can specify the size for it using this option.
/DEVICETYPE:n
DOS does not care what type the device is, but in case some
utility program asks DOS for the type it can be specified with
this switch. This is normally set correctly if you use the /F
switch. Device types are
0 = 360K
1 = 1.2M
2 = 720K
3 = 8-inch single-density
4 = 8-inch double-density
5 = Hard disk
6 = Tape drive
7 = 1.44M
8 = Read/Write optical
9 = 2.88M
/E /ENVIRONMENT
For example:
/F:n /DOSFORMAT:n
/FILESPACE:n
Note that files usually take some extra space because the space
for them is allocated in clusters. For example, if cluster size
is 1024 bytes (1K), any file this long or smaller (but not 0
bytes) will use one cluster and thus 1024 bytes.
/FREEMEM:n /MAXSIZE
FOR XMS MEMORY, THIS CAN ALLOCATE LESS THAN THERE IS AVAILABLE
SINCE XMS CAN NOT RELIABLY PUT ALL FREE MEMORY IN ONE BLOCK.
ALSO, SINCE SOME MEMORY MANAGERS ALLOCATE MEMORY IN BLOCKS OF 4
OR 16 KBYTES, THERE MIGHT BE 15 KBYTES LESS FREE MEMORY THAN
REQUESTED.
If some program of yours needs free memory and you do not care
for disk contents, you can put for example
/HEADS:n /SIDES:n
/M:n[:n...]
SRDISK /M:100
If you would have three or more drivers chained into one drive,
you could define first and third to use 100K and let the other
drivers use as much as they were allowed to use before with
command
SRDISK /M:100::100
/MEDIA:n
Use Media IDs in the range from 0xF0 to 0xFF. Smaller values
make CHKDSK report that it is possibly non-DOS format media.
/O /OLD
Use old disk format where not explicitly redefined with command
line options.
/REGISTER
/S:n /SECTORSIZE:n
/SECTORS:n /SPT:n
/U /UNCONDITIONAL /ERASE
/V:n /VERBOSE:n
/W:x /WRITEPROTECT:x
Write protection contol. The parameter x can be ON, + or nothing
to enable the write protection or OFF or - to disable it.
/Y /YES /FORCE
/NO
/ASK
All questions in SRDISK are formed so that answer YES will give
permission to destroy data and continue, while NO will abort the
operation and try to preserve the data on the disk. By these
options you can give the answer on the command line.
/ASK is the default and means the user will be prompted to make
choise.
6. TROUBLESHOOTING
Causes of grief
1. RAM disks loose their contents when power is turned off! Do not store
anything valuable there.
3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS versions
2.78 and later should be good. Also these later versions may be limited
to 128000K blocks; solution is to link two (or more) SRDXMS.SYS drivers
(i.e. add "DEVICE=SRDXMS.SYS /A" line to CONFIG.SYS) and limit the first
one with command "SRDISK /M:128000". This will only break the /MAXSIZE
option.
6. Some disk caching programs are reported to cache SRDISK too! This can
cause a system crash and caching a RAM disk is anyway useless. If you
use a disk cache, please load it before SRDxxx.SYS or tell it explicitly
not to cache the SRDISK drive.
10. MS-Windows has buggy memory protection that prevents programs from
accessing memory allocated in another session. It also prevents using
EMS memory allocated for the SRDEMS.SYS driver outside Windows and for
the SRDEMS3.SYS driver inside Windows. In general you may find it better
to use SRDEMS3.SYS or SRDXMS.SYS and allocate any disk you will use
before starting Windows and never resize any disk while inside Windows.
7. TRADEMARKS
Oh, and we should not forget these (I can not verify they are correct,
but still):
SRDISK is my trademark.
If any mentioned trademarks are not included in this list, please tell
me about them. They are anyway hereby acknowledged.
8. LAST WORDS
Please, if you know of a way to get around the Windows 3.1 memory
protection, let me know about it.
Internet to `Marko.Kohtala@compart.fi'
CompuServe to `>INTERNET:Marko.Kohtala@compart.fi'
If the above address fails (if you do not get a reply, it propably has
failed), I can still be reached at `Marko.Kohtala@hut.fi'.
Marko Kohtala
PL 115
FIN-01451 Vantaa
FINLAND
You can also call Airline BBS, 24H, HST, V.32, V.42, MNP, +358-0-8725380
and leave mail at the PRIV area to me, Marko Kohtala (sorry, no
netmail there). You can also always get the latest release of SRDISK
from there.
If you have access to Fidonet, Bitnet, UUCP mail or just about any
network, ask your system operator if you can mail to Internet.
You can find the latest release of SRDISK in United States, Illinois at
You can file request latest version using magic file name SRDISK.