home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 2
/
crawlyvol2.bin
/
program
/
pascal
/
pasdox
/
ramdisk.txt
< prev
next >
Wrap
Text File
|
1985-11-18
|
6KB
|
143 lines
{ -----------------------------------------------------------------------------
NOTICE:
THESE MATERIALS are UNSUPPORTED by OSS! If you do not understand how to
use them do not contact OSS for help! We will not teach you how to
program in Pascal. If you find an error in these materials, feel free
to SEND US A LETTER explaining the error, and how to fix it.
THE BOTTOM LINE:
Use it, enjoy it, but you are on your own when using these materials!
DISCLAIMER:
OSS makes no representations or warranties with respect to the contents
hereof and specifically disclaim all warranties of merchantability or
fitness for any particular purpose. This document is subject to change
without notice.
OSS provides these materials for use with Personal Pascal. Use them in
any way you wish.
-------------------------------------------------------------------------- }
Using Personal Pascal With a Ramdisk
So you say you want to use a ramdisk with your Personal Pascal
Compiler on a 520ST? Well, before you go rushing off to try it,
here are a few pointers.
You might think you could just set up a 360K ramdisk, copy the
whole Personal Pascal disk onto it, and be ready to go. After
all, you have 512K of memory in your 520ST, don't you? Naturally,
it is not as simple as it sounds.
Personal Pascal requires about 160K of working or "free" memory to
properly compile most programs. The GEM Desktop eats up about
100K of memory for its own purposes. So there goes 260K of
precious memory right off the bat. And to make matters worse, the
PASCAL.PRG shell uses about 35K of memory on top of it all.
This means that you must leave about 300K of memory free when you
set up the ramdisk. If you are using any desk accessories, this
will reduce the amount of memory available to the system.
Assuming no desk accessories, you should be able to set up a 200K
ramdisk with no problem. If you have desk accessories, you might
want to try a 150K ramdisk.
Now that you have your ramdisk ready to go, how can it be used to
reduce wear and tear on your disk drives? Well, you can put your
source code on the ramdisk. This will help somewhat, but will
require accesses to the disk drive to load the editor, the
compiler, the linker, and the libraries.
We recommend that you use a ramdisk of 150K to 200K and put your
source code along with the Pascal libraries on the ramdisk. This
will have the most dramatic effect during linking, as the linker
is the most disk-bound program.
The only problem is that the linker expects to find the library
files PASLIB and PASGEM on the disk that you ran PASCAL.PRG from.
Since this will be either drive A or B, just copying the library
files to the ramdisk will have no effect. What we need to do is
tell Personal Pascal to use the library files on the ramdisk.
Before starting, PLEASE PLEASE PLEASE make a backup copy of your
MASTER Personal Pascal Disk. We don't want you to make any
changes to the original. Use the backup copy when you follow
these instructions!
Now we can present the patented nine step process for setting up
Personal Pascal to use the library files on the ramdisk.
1. Rename PASLIB and PASGEM to PASLIB.O and PASGEM.O on
your diskette. This can be done in the GEM desktop by
clicking once on PASLIB and choosing "SHOW INFO" in the
FILES menu of GEM. You will see a dialog box with a
whole bunch of information. Press the period key <.>
then type the letter O (not zero), then press the
<RETURN> key. Repeat the same process for PASGEM.
2. Enter Personal Pascal, and edit a file called NULL.PAS.
Type in the following lines:
{$M+}
PROGRAM NULL;
BEGIN
END.
and press the <F10> key.
3. Select the "Linker Options" in the "Options" menu and in
the "Additional Link Files" box type the line:
D:PASGEM,D:PASLIB
where D: is whatever drive code you have assigned to
your ramdisk.
WARNING: If you are compiling programs for TOS, you must
not use PASGEM in the additional link files. Linking
PASGEM with a TOS program will cause countless
headaches.
4. Enter select the "Compiler Options" dialog box and
enter D: into the "Temporary Directory" line.
5. Having done this, select "Save Options..." in the
"Options" menu to save these modifications.
6. Set your compiler options so that the compiler DOES NOT
CHAIN to the linker, then compile NULL.PAS. Assuming no
errors during compilation, select "Quit" from the
"Files" menu, and return to the GEM desktop.
7. Select (click on) the file called NULL.O. Select SHOW
INFO from the FILE menu, press the <ESC> key, and type
in the name PASLIB. Hit <ENTER>.
8. Make a copy of this new PASLIB (by dragging PASLIB onto
the same window). When you see the "NAME CONFLICT"
dialog box, press <ESC> and type in the name PASGEM and
press <RETURN>.
9. Go out and celebrate!! You have successfully set up
Personal Pascal to use your ramdisk.
Now, when you want to use your ramdisk, you will have to copy your
Pascal source code, along with the files PASLIB.O and PASGEM.O
onto the ramdisk before compiling and linking, but the speed
improvement should be well worth the effort.