DOCUMENTATION FOR XDRIVE.ASM Version 1.0 by Herb Shore and Paul Grupp Aug. 24, 1983 This program will allow extra memory beyond the usual 64K to function as though it were a very fast disk drive. You may want to change the name of the installed program to indicate the name of the new drive, i.e. CDRIVE.COM for drive C:. The extra drive (drive M: as distributed) can be used in the same way as all the other drives, though of course all data on this drive is lost when the power is turned off. One way to use the system is to PIP over all working files to drive M: after activating the XDRIVE, working on the files while logged onto M:, and then PIPing them back to a floppy before shutting down the computer. For repetitive operations such as assembling, compiling, using a word-processor with overlay files, etc., the increase in speed is fantastic. The system is especially easy to use if you have replaced the standard CCP with ZCPR or ZCPR2. With ZCPR, the standard utility files (PIP, STAT, MAC, etc.) can remain on drive A:, since these files are not accessed after they have been loaded. ZCPR will automatically search A: for these files if they are not present on M:. Only those files which are repeatedly accessed need be on the fast drive. To implement the system, edit XDRIVE.ASM setting the system dependent equates, then assemble using MAC. Note that the Maclib Z80.LIB is needed. Produce the COM file from XDRIVE.HEX using LOAD or DDT. Then to activate the XDRIVE run XDRIVE.COM from CP/M. This program will ask if you wish to initialize the directory area of M:. If the computer has just been turned on, answer YES, since the directory area contains garbage. However, if your system has crashed due to a program runaway, it is very likely that extended memory is still OK. In that case you can do a cold boot, run XDRIVE, and answer NO when asked if the directory should be initialized. When XDRIVE signs on it reports the available file space for the RAM drive. SOFTWARE REQUIREMENTS: The XDRIVE system requires about 1K bytes of global RAM above the BIOS. To be exact, the actual amount is 410 bytes plus one byte for every 8 blocks of disk space. One block is 1Kbyte for systems with 256K or less of disk-RAM and 2Kbytes for systems with more than 256K. These details are only necessary if one is attempting to conserve every byte, since providing 1K of space above the BIOS is more than adequate. You may have to reduce the size of your CP/M system to provide the space. Other than providing this space, there are no special requirements for the size of the CP/M system or the location of the BIOS; this is determined by the program. HARDWARE REQUIREMENTS: As described above, approx. 1K of global RAM must be provided. Global RAM is memory that responds to the standard 16 bit address bus independently of the setting of the 8 bit extended address bus. If your global RAM is larger than 1K, the system will still work, but the memory available for the extra disk is reduced. The system must provide a way of setting the extended address bits by outputting the extended address to an output port. If your present system does not have this capability, it can be easily implemented. Turning 1K of RAM into global RAM is also not difficult. One way is as follows: connect a 6-input AND gate to monitor address lines A10-A15. When all six lines are high, the upper 1K of memory is being addressed. When this happens, tri-state the circuit (output port) driving the extended address bus and force all 8 bits of this bus to be low. Thus, the RAM at extended address 00H will become global for the upper 1K of the 64K address space. A word of caution: If your system uses DMA devices, these devices may also attempt to drive the extended address bus. Make sure that any extra circuitry you add is disabled during DMA operations in order to avoid bus conflicts. Also note that if DMA devices do write into the extended address space, that this will overwrite the data on the M: drive. HISTORY: XDRIVE replaces and obsoletes an earlier memory-disk program by one of us (HBS) called RAMDRIVE. The prime objective in going from RAMDRIVE to XDRIVE was to produce a "universal" program that would work under a wide variety of hardware and software environments. The program has run without apparant bugs on a number of different systems, with/without hard disk, with/without interrupts, with small/large amounts of extra RAM. The major differences between the two programs are as follows: 1) RAMDRIVE used a separate loader program and needed a complicated procedure to produce a COM file; XDRIVE is self- relocating and is simple to install. 2) RAMDRIVE used a 1K block size, which will not work with more than 256K of RAM-disk. XDRIVE sets the block size to 1K or 2K automatically depending on the amount of extra RAM, and will work with any amount of RAM. 3) XDRIVE is much more memory efficient than RAMDRIVE in that it relocates to high memory only those routines that must be there -- less than 512 bytes. 4) RAMDRIVE did not work in a system using interrupts. XDRIVE senses if interrupts are enabled and, if so, disables them during accesses to extended memory. This allows operation with an interrupt driven system.