
         The 'Why' and 'How to' install a System GrafDISK
                       by William R. Bowman

This discussion is a tutorial on ramdisks, written specifically to cover the installation and use of a GrafDISK, which is the same as a Memdisk except the 32K graphic memory of a Radio Shack graphics board is used in addition to banks 1 and 2, thereby increasing the size from 14 cylinders to 21 cylinders.  We will also be discussing the use of GDsave and GDload which are utility programs to save a complete GrafDISK including the dcts and driver to a disk file for very fast creating and loading of the GrafDISK at boot up.  For those who do NOT have a Radio Shack graphics board installed, a type A GrafDISK may be installed which does not use the graphics memory, thus creating the smaller 14 cylinder GrafDISK similar to a Memdisk.  The GDload and GDsave programs will handle a type A GrafDISK, but may NOT be used with a Memdisk.

Maybe your are wondering, 'why would I want to consider using a GrafDISK'?  The GrafDISK being a simulated disk drive installed in MEMORY, is extremely fast when reading or writing files or data to that drive.  It can be used exactly like any disk drive (except it is smaller) to hold programs or data files.  About the only real disadvantage is that when the computer is turned off, everything on the GrafDISK is lost.  The GDsave and GDload overcome this disadvantage to a great extent by allowing all the data to be replaced on the GrafDISK very quickly without going through a long backup or copying procedure.  Though considerable time may be required to prepare the files on the original GrafDISK and save it with GDsave, the GDload program will then be able to configure and load that specific complete 21 cylinder GrafDISK in about 15 seconds.  I think you will agree, the disadvantage has nearly been eliminated.

The two main uses for a GrafDISK (or any ramdisk) are:   1) To add another disk drive to the system for use in copying or temporarily storing data or files.   2) To utilize the speed capabilities of the GrafDISK (or any ramdisk) by using it with a program that makes a great many disk reads or writes to and from data files while the program is in use, thereby speeding up the program operation.

Probably the best use results in a combination of both of the above uses.  The Dos itself, almost continuously reads overlay files from the system drive as it executes various commands.  In many cases when a running application program issues a SVC call to the Dos, the Dos must read in an overlay to process the request.  Consequently if the Dos is loaded into a GrafDISK, and the GrafDISK is then switched to be the system drive (drive 0), with the system running from the GrafDISK, the maximum gain in operating speed is obtained.  When the system is switched to the GrafDISK, the previous drive 0 is released for use as a data drive, so we have an extremely fast operating system with two data drives free for any use desired, running on a standard two drive computer.  Use of the GDload program will allow this complete setup to be made at boot up very quickly.

The rest of this discussion will describe the method of initializing a GrafDISK, preparing it as a system drive containing the operating system, saving it to a disk file with GDsave, and how to set up the computer to boot and load this file with GDload so as to come up running on the system GrafDISK with two disk drives free for use as desired.

It is very important that you start this process by booting your computer with NO filters or drivers set.  If you have filters or drivers set that are SYSGENned, you must boot up with the [Clear] key pressed so as NOT to load the CONFIG/SYS file.  Use the device (b) command to check your configuration to verify that the drives are enabled properly and NO filters or drivers are active.  Another check is to run Mem4/cmd (on MCTRUG's UTILITY Disk # 55) to see that the low core area is free.  Since the GrafDISK driver must install in low core, you should NOT set many drivers or filters that may prevent GrafDISK from installing, however if your MUST have the forms filter or the Comm driver set, you may do so now.  Remember you cannot have anything that uses banks 1 and 2 installed (such as Spool, Prowam or Double Duty etc.) as these would lock out banks 1 and 2 so as to prevent the installation of the GrafDISK.   Once the GrafDISK is installed, it will lock out banks 1 and 2 so that any program trying to use these banks will not initialize them.  Programs that use the high banks (like FastTerm II, Visacalc, XT4, LeScript etc.) will run without using these banks for their buffers.  But... watch out, as you may find a program you are used to running with an 80K buffer now has a very small buffer, which could make it almost unusable.  (Example:  FastTerm II using the high banks has a 72K buffer, but with the high banks locked out it runs with ONLY an 8K buffer.)

When you have your system configured just the way you want it, sysgen it with SYSGEN [Enter].  Now when you boot up and the configuration file is read in, your system will be placed in this condition.

In all of the following discussion and instructions, it is assumed that you are running a two drive system with drives 0 and 1 enabled.  If you have additional drives enabled, replace the drive 2 anywhere shown with the next UNUSED drive number.

You are now ready to initialize the GrafDISK.  Do so with:

    SYSTEM (DRIVE=2,DRIVER="GRAFDISK") [Enter]

Answer the prompts for a B type GrafDISK (if you have the graphics board installed. Answer A if not).  Answer the Format prompt with Y.  The GrafDISK will now install and return you to Dos Ready.  Check out what you have with the DIR :2, FREE :2 and the DEVICE (B) commands so as become familiar with the responses to these commands.

There are several ways to copy the system files to the GrafDISK.  First let's think a bit about what is needed.  Since we will NEVER boot from the GrafDISK, we do NOT need SYS0/SYS or BOOT/SYS, however the Boot system MUST be there as a few bytes are required for system operation.  The boot will be handled automatically when we backup the system files.  Since space on our GrafDISK is limited, SYS5/SYS and SYS9/SYS (Debug & Extended Debug) probably won't be needed.  SYS13/SYS contains nothing, so, unless you are running a shell program that requires it's command interpreter be loaded as SYS13/SYS, it will not be needed.  Our first thought is probably to just backup all system files and then delete the unwanted ones, but this would leave gaps which when filled later with other programs would slow their loading due to fragmentation of the files.  A better way is to use the Backup program with the QUERY parameter, then select the files to move when prompted.  Using the backup (q) parameter will force backup to display each file that it finds and prompt you for yes or no whether to copy the file or not.

To copy ONLY the required system files to the GrafDISK (drive :2) use the following:

   BACKUP $/SYS:0 :2 (S,Q) [Enter]

Backup will attempt to copy only system files from drive 0 to drive 2.  It will prompt for a y or n for each file that it finds on drive 0.  Note if you already have purged any system files from your source disk, Backup will not prompt for the missing files.  The example below was made with a complete system disk.  You will see a display as the process takes place that looks like the following example.  Note that the prompt for each file has been given a Y or N and backup has done it's job accordingly.

BACKUP - 6.3.0 - Copyright 1982/83/84/86 by Logical Systems, Inc.
All Rights Reserved. Unauthorized duplication is prohibited.

Backup by class invoked
Backup SYS6/SYS {01-Dec-86} ? Y
Copying file: SYS6/SYS
Backup SYS7/SYS {16-Jun-88} ? Y
Copying file: SYS7/SYS
Backup SYS0/SYS {05-Jul-87} ? N
Backup SYS8/SYS {14-Jun-88} ? Y
Copying file: SYS8/SYS
Backup SYS1/SYS {01-Dec-86} ? Y
Copying file: SYS1/SYS
Backup SYS9/SYS {02-Dec-86} ? N
Backup SYS2/SYS {01-Dec-86} ? Y
Copying file: SYS2/SYS
Backup SYS10/SYS {01-Dec-86} ? Y
Copying file: SYS10/SYS
Backup SYS3/SYS {01-Dec-86} ? Y
Copying file: SYS3/SYS
Backup SYS11/SYS {01-Dec-86} ? Y
Copying file: SYS11/SYS
Backup SYS4/SYS {01-Dec-86} ? Y
Copying file: SYS4/SYS
Backup SYS12/SYS {01-Dec-86} ? Y
Copying file: SYS12/SYS
Backup SYS5/SYS {02-Dec-86} ? N
Backup SYS13/SYS {06-Jan-87} ? N

Backup complete.

We have now copied the entire system (less sys0, sys5, sys9 and sys13) to our GrafDISK.  Again you might use the DIR :2 (s), and FREE :2 commands to see what has taken place.  You will notice that Backup has lengthened the boot/sys so it now completely consumes cylinder 0.  (Note x's in the Free map before and after running Backup).  You will also note that the free space on drive 2 is now 43.5K which will provide room for several more files.

At this point you may NOT wish to copy additional files to the GrafDISK but rather copy files there when you get ready to run them.  If so, just skip the following instructions for filling the rest of the GrafDISK.  However, I think you will find it interesting and educational to follow this example for filling the GrafDISK and later, possibly just dump it and recreate one to suit your own needs.

In this example we will copy Basic/cmd, Basic/ov1, Basic/ov2, FED/cmd, TED/cmd and another small 1.5K file for filler.  It takes some planning and calculation to fill the GrafDISK with files (and NOT overfill it and get a disk full error).  We know that we have 43.5K of space, so we look at our directory of drive 0 and jot down the sizes of the files we hope to install.  We find Basic/cmd is 24.0K, Basic/ov1 is 3.0K and Basic/ov2 is 1.5K in size for a total of 28.5K.  This total is less than our available 43.5K so we know these files will fit.

We now use the copy command to move these files to the GrafDISK as follows.

   COPY BASIC/CMD.BASIC:0 :2
   COPY BASIC/OV1.BASIC:0 :2
   COPY BASIC/OV2.BASIC:0 :2

Using the copy command requires us to furnish the password for these files.  BASIC is the password for each of them.  Using the DIR :2 (s,i) and the FREE :2 commands we can again see what has happened.  We see that we now have 15.0K free space left on our GrafDISK.  We again check our directory and find that Model 4 FED is 13.5K in length so we know we can copy it to our GrafDISK.  If you do NOT have FED/CMD select another file or files NOT to exceed the 15K of free space and copy them to the GrafDISK using the copy command.

   COPY FED/CMD:0 :2

Again using the DIR :2 (s,i) and FREE :2 we find we have 1.5K left free on our GrafDISK.  If you used other files, you may have another value of free space.  We now wish to completely fill the remaining space on the GrafDISK.  In the example I used UNKILL/CMD but any 1.5K file will do.

   COPY UNKILL/CMD:0 :2

The DIR :2 (s,i) and FREE :2 commands now show 00K free and solid xs on the free map.  If your GrafDISK is NOT full, copy enough additional files to fill it completely.  At this point we want to release the 3K of locked out grans on cylinder 0 which are assigned to the boot/sys but not being used.  We do this AFTER the GrafDISK is FULL, as we don't want any files wrapping from cylinder 21 to 0 thereby fragmenting the file.  We could release these grans by zapping the Boot Directory entry of the GrafDISK with FED, but it is much easier using SHRTBOOT/CMD which was written to do exactly this little job.  It is also supplied on this disk.

   SHRTBOOT [Enter]

The job is done as you can now see with the DIR :2 and and FREE :2 commands.  We see that we have 3.0K free which is just enough for TED/CMD or any other 3K file you may wish to put on the GrafDISK in this space.

   COPY TED/CMD.UTILITY:0 :2

Now the DIR :2 and FREE :2 commands will show the GrafDISK is full and this time it really is.  Nothing more can be added and we are ready to set it up as a system drive and get the computer running on it.

At this time you may wish to issue the following command:

   SYSTEM (DRIVE=2,DELAY=)

This supposedly would set the delay time before accessing the drive from 1ms to .5ms.  Since there is no motor on the GrafDISK, I don't think this has any effect whatsoever but it does make your device table look more consistent.  Use it if you see fit.

You may have noticed at the bottom of the device display, that it shows we have a Memdisk installed.  If you want to really do it up neat, so that GrfDISK will be displayed instead, type the following patch from Dos Ready.

PATCH SYS6/SYS.LSIDOS:2 (D21,28=47 72 66:F21,28=4D 65 6D)

NOTE--This is patching the sys6 on your GrafDISK, NOT your current system disk, so this will only show GrfDISK on the device table when THIS GrafDISK is in place running as the system.  Any other time Memdisk will show as usual if one is installed.

Our GrafDISK is full, and we don't want any programs to attempt to write to it thereby producing a disk full error, so it is best to software Write Protect the GrafDISK.  This is done with:

   SYSTEM (DRIVE=2,WP)

This can of course be removed with SYSTEM (DRIVE=x,WP=) later if you wish to replace a file on the GrafDISK.  Remember it probably will NOT be drive 2 at that time so replace the x with the proper drive number (probably drive 0).

NOW...for the big moment!!!  It's time to switch the GrafDISK into drive 0 position and have the system use it as the system drive.

Fingers crossed?  Here we go!!!

   SYSTEM (SYSTEM=2) [Enter]

We should now be running on the GrafDISK as the system drive.  Use the DEVICE (B) command and check it out.  If drive 0 is not shown as WP [GRAFDISK], something went wrong.  Check out every step and if you can't find the problem, start over by booting the system.  The configuration should be correct to again start building the GrafDISK but better verify it with the device (b) command.

Assuming everything went right and we are running on the GrafDISK system drive, you NO LONGER need your system disk in the old system drive and that drive can be used for anything you wish.   Try it out, type BASIC [Enter].  Pretty speedy??  Even a Hard Drive does not load Basic that fast.  Use some library commands like dir, free, lib etc.  I think you will find the system has a completely different feel.  And I might add a NICE feel.  It's addictive and you're probably already hooked, so let's proceed.

You will now find that the top drive (right on 4P) is drive 1 and the bottom drive (left on 4P) is drive 2.  If you wish to switch these so 1 is on the bottom (left on 4P) and the top drive (right on 4P) is drive 2, you may use the SWAP/CMD program that is included on this disk.  Just use:

   SWAP 1=2 [Enter]

I personally like it better swapped, but this is up to you.  Just do whatever makes it most convenient and comfortable for YOU.

We are ready to save the GrafDISK to an image file on disk.  You MUST have a disk on line that will hold 96.5K.  A freshly formatted disk is suggested at least for now.  You may wish to copy GDLOAD/CMD and GDSAVE/CMD to this disk now so they will be available on line when needed.

   GDSAVE GRAFSYSB/IMG:d [Enter]

If you are using a type A GrafDISK you MUST use:

   GDSAVE GRAFSYSA/IMG:d (A) [Enter]

unless you have patched GDSAVE to default to type A. (See GDsave-load doc file)

The filespec shown is MY way of telling myself that this file is a System GrafDISK type B image file.  You may of course use any filespec that suits YOU but a descriptive filespec is useful if you have several of these images saved for different purposes.

GDsaving is a pretty slow process as this is a big file and the system spends a lot of time getting more space open as it moves the file.  You could use the Create command to create a 96.5K file before using the GDSAVE program, but I hate Created files on my disks so I NEVER use that.  Another way, if you are going to build and GDsave some more image files, just copy this one to another disk, rename it to whatever your new image file will be then just let GDsave copy right over it.  Much faster and no create flags all over the disks.

OK, were finished.  We have our image file ready for next time we boot, so let's see how it works.  Type BOOT or press reset if that's your thing.  At Dos ready just type:

   GDLOAD GRAFSYSB/IMG:d [Enter]

Don't forget to add the (A) if the image file is for an A type Grafdisk.  When you see the Dos Ready prompt, you are running on the GradDISK system you prepared and saved in the image file.  I think you will agree that got things handled in a hurry.

If you want to auto this boot up to a system GrafDISK, just boot again and at Dos Ready, type:

   AUTO GDLOAD GRAFSYSB/IMG [Enter].

Now when you boot, you will go directly to the system GrafDISK.  You can prevent the auto command from initializing the GrafDISK by holding down [Enter] while booting (or after the date and time is entered).  Since GDload has the capability of running a second program from the auto command, if you have some other program that also needs to run from the auto command, just add it after the GDload instruction, ie:

   AUTO GDLOAD GRAFSYSB/IMG STARTEXT [Enter]

This would initialize the GrafDISK system and then run STARTEXT/CMD.  A JCL could be run in place of Startext/cmd using DO =MYJCL or whatever is suitable.


The entire initialization of the GrafDISK and moving the system and files to it can be performed by a JCL if you wish.  It is a good way to keep a list of the commands to do the job even if you don't run it as a JCL.  You could of course modify the JCL to build other system GrafDISKs probably saving some time.  Included on this disk is a JCL created from the above instructions (except for slight modifications to be able to include the swap 1=2 before the system (system=2) command).  NOTE in the JCL the swap 1=2 switches the GrafDISK to drive 1, so it is necessary to use system (system=1) to switch the GrafDISK to drive 0.  Other than this the JCL follows the procedures as listed above.  When running from a JCL, the system (system=x) command MUST be the last command in the JCL as the JCL will abort when the system is switched.

Of course after running the JCL, you would have to use GDsave to save the image to the disk file.

One final point that may be of interest.  You are probably familiar with the DEBUG program in Dos even if you never use it.  It sometimes just appears without any known provocation.  Debug does not run from typing DEBUG [Enter].  This just sets a flag and the next program that is run, just loads and jumps to DEBUG.  You probably know that typing o gets you to Dos and typing DEBUG (OFF) then turns Debug off so you may again run programs normally.  If you have a system (like our GrafDISK system in which DEBUG (sys5) is NOT present, and you type DEBUG [Enter], or the DEBUG flag is flipped by some unknown source, you will not be able to run any programs.  The Debug screen will NOT appear, you will just get a 'Error 07H' message on the screen every time you attempt to do much of anything.  If this happens just type DEBUG (OFF) [Enter] to get back to normal.  I suggest you try this with the GrafDISK system running so you will be familiar with the symptoms.  It might save you a reset to get the computer to behave itself again.  To try it just type DEBUG [Enter] at Dos ready, then try to run any program and press [Break] a few times.  When you see and understand what is happening, just type DEBUG (OFF) [Enter] and everything will be back to normal again.

Hard Drive users with a bit of ingenuity, can build and install a GrafDISK to run as the system drive with the Hard Drive.  Lyle and I both run our Hard Drives from a system GrafDISK most of the time.  You will be surprised to find a GrafDISK system has a faster and better feel than the Hard Drive running from a system partition on the Hard Drive.  Try it, you'll like it.

It is hoped that you found this discussion interesting, educational and the results useful.  If you have any problems or questions concerning setting up a system GrafDISK please do not hesitate to drop a note to the author or to Lyle in care of

MCTRUG
P.O. Box 171566
Arlington, Tx 76003

We will do our best to get you an answer back and assist you in any way possible if you also send a SASE.
