MEMDISK for TRS-80 Model 4 by:

Duane M. Saylor
 VolksMicro Computer Systems Inc,
 202 Packets Court
 Williamsburg, Va 23185
 VolksBoard TBBS (804) 220 0003
 Voice           (804) 220 0005
 
All programs on this disk are copyrighted by the authors and may not be sold by
anyone.  They have been placed in the public domain and may be freely
distributed to any and all that can use them.
 
The following files are on the disk you just received.
 
 README/TXT  The file you are now reading
 FDR5/DOC    Documentation for LDOS 5.1.4
 FDR6/DOC    Documentation for TRSDOS6 version
 MDISK5/DOC  Documentation for LDOS 5.1.4 memdisk
 MOD4/FIX    Patches for LDOS 5.1.4 (These installed automatically by MAKE5/JCL
 PRFLT/FIX   Patch for PR/FLT under LDOS 5.1.4 

 JCL files to install memdisk and use it.
 By Duane Saylor

 COPY5/JCL   Copy files from master disk to your system disk
 COPY6/JCL   Copy files from master disk to your system disk
 MAKE5/JCL   Format, and create system disk and sysgen SYS files for LDOS 5.1.4
 MAKE6/JCL   Same as above for TRSDOS 6
 RAM5/JCL    Make MEMDISK, copy SYS file to it and dump to RAMDISK/CIM file
 RAM6/JCL    Same as above for TRSDOS 6
 INIT5/JCL   Cold boot start up to configure and restore RAMDISK/CIM to memory
 INIT6/JCL   Same as above for TRSDOS 6

 Fast Dump and restore program to dump memdisk to file and restore it.
Modifed from FDR for the MAX80 (by Joe Ossino) by Duane Saylor

 FDR5/ASM    Source for LDOS 5.1.4 version
 FDR5/CMD    Command file for LDOS 5.1.4
 FDR6/ASM    Source for TRSDOS 6 version
 FDR6/CMD    Command file for TRSDOS 6 version
 
 Program to create memdisk under LDOS 5.1.4
 Modified from MDISK for the MAX80 (By Doug Hogarth) by Duane Saylor
 
 MDISK5/ASM  Source code
 MDISK5/CMD  Command file

Program to move memdisk to system slot in DCT and all other drives up one.
Program by Jeffrey Brenton.  MOVE6 modifed by Duane Saylor to work from JCL
file

 MOVE5/ASM  LDOS 5.1.4 Source code
 MOVE5/CMD  Command file
 MOVE6/ASM  TRSDOS 6 Source code
 MOVE6/CMD  Command file

*******************************

The programs on this disk will permit you to create a system disk that will
boot and automatically make the 64k banked memory into a memdisk with your
system files either sysgened in high memory or in the memdisk.  The programs
were originally written by Doug Hogarth for the MAX-80 (MDISK) and Joe Ossinno
(FDR).  I disassembled them and modified them for the Model 4. The MEMDISK/DCT
supplied with TRSDOS 6 is used to create the MEMDISK on TRSDOS6.  FDR is used
to Dump and Restore the programs from and to the 64k banked memory.  LDOS 5.1.4
is used in Model III mode and TRSDOS 6 in Model 4 mode.  Other operating
systems are not supported because they either do not have DCT's (Drive Code
Table) or they have a different definition of the bytes in the DCT.

To create an LDOS 5.1.4 boot disk put a backup copy of your master in drive 0
and the disk with the MEMDISK programs in drive 1.  It is assumed you are
using standard 40 track drives.  Then execute DO = COPY5.  This will copy the
required programs from drive 1 to drive 0 and will prompt you for the
remainder of the configuration.

To create a TRSDOS 6 boot disk put a backup copy of your master in drive 0 and
the disk with the  MEMDISK programs in drive 1.  It is assumed you are using
standard 40 track drives.  Then execute DO = COPY6.  This will copy the
required programs from drive 1 to drive 0 and will prompt you for the
remainder of the configuration.
 
The memdisk configuration under TRSDOS 6 has SYS4, SYS6, SYS7, & SYS8 are
stored in banked memory in the memdisk.  This leaves 24k for other programs.
If you can sacrifice some or all of the library functions in SYS6, SYS7 and
SYS8 you can get a lot more room for other programs.  When you copy other
programs to the memdisk you should execute the command:
 
 FDR6 (D="ramdisk")

This will copy the revised configuration of the memdisk to the file RAMDISK/CIM
for automatic loading the next time you boot.

The system overlays SYS1, SYS2, SYS3, SYS10, SYS11, & SYS12 are sysgened to
high memory.  If you want more memory space for programs you can modify the
JCL files MAKE6/JCL and RAM6/JCL to put other overlays that or sysgened on the
memdisk and thus recover high memory space.  If you use the DEBUG monitor you
should either sysgen it or put it on the memdisk.  Same applies to SYS9 which
is the extended debugger.  Be aware that you can not change the sysgen while
the memdisk is active. What you must do is boot up while holding down the
<ENTER> key to abort the AUTO command and then change the sysgen configuration.

***********************************************

 Separateing Programs from the Library files

 The System files SYS6/SYS & SYS7/SYS in LDOS 5.1.x and SYS6/SYS, SYS7/SYS and
SYS8/SYS in TRSDOS 6.x contain many utility programs.  By putting them in
these "Partitioned Data Sets", disk space is saved, yet any program can be
rapidly executed.  When you use MEMDISK these files take up a large part of
the 64k space if you leave them all on the MEMDISK.  You can purge one or more
of these files from the MEMDISK, but then if you want to do a DIR or FREE you
will get an Error 7.

Fortunately there is an alternative.  LDOS 5.1.4 comes with the utility
CMDFILE.  PROCESS is available separately from MISOSYS in Alexandria, Va and
will perform the same functions under TRSDOS 6.x.  I will use CMDFILE as an
example to show howe to extract one of the library programs from SYS6/SYS.

After executing CMDFILE and selecting Disk enter the filename
SYS6/SYS.RS0LT0FF.  CMDFILE will prompt that the file contains ISAM overlays
and ask for a number.  Enter 14 (if you want to get DIR) and CMDFILE will load
the code for DIR into a buffer.  Next press <ENTER> to end loading and
continue pressing <ENTER> until the prompt for an output file name is given.
Then enter LDIR/CMD (You can use any file name you want but do not use DIR as
that will result in an error 7 if you later kill SYS6/SYS.) and the code will
be written to a disk file.

You can also use CMDFILE to extract programs from the TRSDOS 6.x library files
but you must do it while operating with LDOS 5.1.4.  Just put the TRSDOS 6.x
in drive 1 and use LSIDOS as the password.  Thus SYS6/SYS.LSIDOS:1 would be
used if you wanted to get the DIR from TRSDOS 6.x while operating under LDOS
5.1.4.

To get other programs you have to know the ISAM #.  These can be located by
using a file editor such as FED, LSFEDII or SU+ to examine SYS1/SYS.  You can
easily locate the names of all the library commands.  Following each library
name will be a two byte code.  The first byte is the ISAM number and the
second byte will be 80 if the program is in SYS6 and C0 if it is in SYS7.
These apply for LDOS 5.1.4.  Under TRSDOS 6.x the codes are 80 for SYS6, A0
for SYS7 and C0 for SYS8.  To save some research work the following is a list
of the codes for LDOS 5.1.4:

 ISAM overlay numbers for LDOS 5.1.4

 SYS6/SYS.RS0LT0FF    SYS7/SYS.RS0LT0FF

 APPEND 31            ATTRIB  51
 COPY   32            AUTO    11
 DEVICE 13            BUILD   33
 DIR    21            CLOCK   17
 DO     91            CREATE  13
 FILTER 66            DATE    15
 KILL   18            DEBUG   14
 LIB    19            DUMP    71
 LINK   62            FREE    22
 LIST   41            PURGE   72
 LOAD   81            SYSTEM  A1
 MEMORY 1E            TIME    16
 RENAME 53            TRACE   1A
 RESET  63            VERIFY  1B
 ROUTE  64
 RUN    82
 SET    65
 SPOOL  A2

 ISAM overlay numbers for TRSDOS 6

 SYS6/SYS.LSIDOS      SYS7/SYS.LSIDOS      SYS8/SYS.LSIDOS

 APPEND 31            ATTRIB  51           FORMS   B1
 COPY   32            AUTO    11           SETCOM  B2
 DEVICE 61            BUILD   33           SETKI   B3
 DIR    21            CREATE  13           SPOOL   A2
 DO     91            DATE    15           SYSGEN  1C
 FILTER 66            DEBUG   14           SYSTEM  A1
 KILL   18            DUMP    71
 LIB    19            FREE    22
 LINK   62            PURGE   72
 LIST   41            TIME    16
 LOAD   81            VERIFY  1B
 MEMORY 1E
 RENAME 53
 RESET  63
 ROUTE  64
 RUN    82
 SET    65

 