RAMDRIVE.CPY commands:

 

POKE, DPOKE, PRINT, and PROMPT -

These commands work in exactly the same way as they do in the RAMDRIVE.CFG file.

 

 

XIO - parameters 5

parameter 1: number (0-255) or constant (RENAME - 32, ERASE - 33, DELETE - 33, PROTECT - 35, UNPROTECT - 36, FORMAT - 254) - operation to perform

parameter 2: number (0-7) - IOCB number

parameter 3: number (0-255) - aux byte 1

parameter 4: number (0-255) - aux byte 2

parameter 5: string - drive and/or file specifier

 

Issues an XIO command to the specified real or ramdrive. This is similar to BASIC's XIO command. It's most useful function is to format ramdrives. Care should be taken not to accidentally format a physical drive with this command, and hence lose all the data stored on your floppy. There is no check made to see if the destination is a ramdrive or not. The second parameter to this command specifies the IOCB to use. IOCB 0 is reserved for the screen and IOCB 4 is reserved by the ramdrive loader, but all other IOCB's are available for your use. If you do try to use IOCB 4 then you will receive an error. Ex.

 

XIO FORMAT,2,0,0,"D3:"

 

 

WRITE_PROTECT - parameters 2

parameter 1: number (0-9) - drive number

parameter 2: constant (ON, OFF) - protect or unprotect

 

Used to write protect and unprotect ramdrives, the first parameter specifies the ramdrive number to protect/unprotect, the second parameter specifies whether it should be protected or unprotected. All writes to a protected ramdrive will fail. After the ramdrive has been set up it can be protected and unprotected by pressing the OPTION key along with the ramdrive number. Ex.

 

WRITE_PROTECT 3,ON

 

 

COPY_FILE - parameters 2 or 3

parameter 1: string - source file name

parameter 2: string - destination file name

parameter 3: (optional) string - prompt text

 

This command copies the file named in the first parameter to the file named in the second parameter. The drive where the source and destination files are found should be specified along with the corresponding file name. Wild cards are not supported. Most ramdisks will automatically copy the DUP.SYS file onto your ramdisk when they are set up. Ramdrive 1.0 doesn't copy any files unless specifically told to do so with this command. If you wanted DUP.SYS to be copied onto your ramdrive automatically then you would add a line to RAMDRIVE.CPY as follows:

 

COPY_FILE "D1:DUP.SYS","D8:DUP.SYS"

 

where D8 is your ramdrive. The third optional parameter allows you to display a prompt and wait for the user to press a key before continuing. Use this parameter if the file you want to copy is on a different disk from the RAMDRIVE.CPY file and you only have one real drive. Ex.:

 

COPY_FILE "D1:CPFILE1","D8:RAMDFILE","INSERT CPFILE1 DISK AND PRESS ANY KEY"

 

This would display the prompt and wait for the user to press a key before trying to copy the CPFILE1 file to D8: as RAMDFILE. If you have removed the RAMDRIVE.CPY disk, you will be asked to reinsert it after the file has been copied.

 

 

COPY_SECTOR - parameters 3,4,5,6 or 7

parameter 1: number (0-9) - source drive number

parameter 2: number (0-9) - destination drive number

parameter 3: number (0-65535) - source sector number

parameter 4: (optional) number (0-65535) or string (if last parameter) - number of sectors to copy or prompt

parameter 5: (optional) number (0-65535) or string (if last parameter) - destination sector number or prompt

parameter 6: (optional) constant (SD - single density, DD - double density, QD - quad density, OD - oct. density) or string (if last parameter) - sector size or prompt

parameter 7: (optional) string - prompt

 

Copies one or more sectors from the source drive to the destination drive. This is useful for copying a whole disk or specific sectors onto your ramdrive. The size of the source and destination sectors must be the same, i.e. you cannot copy a sector from a single density disk (128 bytes per sector) to a double density disk (256 bytes per sector). The number of sectors to be copied can be specified in the fourth parameter, this will default to 1. Multiple sectors can be copied in this way with one COPY_SECTOR command. The fifth parameter specifies where the sectors should be copied to, if not specified then the destination sector number on the destination drive will be the same as the source sector number on the source drive. If more than one sector is being copied then the destination sector numbers will increase as the source sector numbers increase. If the last parameter to this command (either the 4th, 5th, 6th or 7th parameter) is a string then this string will be displayed as a prompt and Ramdrive 1.0 will wait for the user to press a key before continuing. Use this parameter if the sectors you want to copy are on a different disk from the one that RAMDRIVE.CPY is on and you only have one real drive. If you have removed the RAMDRIVE.CPY disk, you will be asked to reinsert it after the sectors have been copied. Ex.

 

- Copy sector 360 from drive 1 to drive 8 -

COPY_SECTOR 1,8,360

 

- Copy sectors 360 to 369 inclusive from drive 1 to sectors 400 to 409 inclusive on drive 2 -

COPY_SECTOR 1,2,360,10,400

 

- Displays message and waits for keypress before copying sectors 30 to 129 from drive 1 to drive 8 -

COPY_SECTOR 1,8,30,100,"insert disk 2"

 

 

MODIFY_SECTOR - parameters 4,5,6,7 or 8

 

parameter 1: number (0-9) - drive number

parameter 2: number (0-65535) - sector number

parameter 3: number (0-1023) - byte number

parameter 4: number (0-255) - value to store

parameter 5: (optional) number (0-1024) or string (if last parameter) - number of bytes to modify or prompt

parameter 6: (optional) constant (STA - store, EOR - bitwise exclusive or, ORA - bitwise or, AND - bitwise and) or string (if last parameter) - operation to perform or prompt

parameter 7: (optional) constant (SD - single density, DD - double density, QD - quad density, OD - oct. density) or string (if last parameter) - sector size or prompt

parameter 8: (optional) string - prompt

 

This command modifies the specified byte(s) in the given sector. The bytes are numbered from 0 to sector size-1 (127 for single density, 255 for double density, etc.). This command provides simple sector editing capabilities. The 6th parameter if present and not a string, specifies if the value given in the 4th parameter should replace (STA) the value already there, or perform a bitwise operation on it and store the result (EOR, ORA, AND). If the last parameter to this command (either the 5th, 6th, 7th or 8th parameter) is a string then this string will be displayed as a prompt and Ramdrive 1.0 will wait for the user to press a key before continuing. Use this parameter if the sector you want to modify is on a different disk from the one that RAMDRIVE.CPY is on and you only have one real drive. If you have removed the RAMDRIVE.CPY disk, you will be asked to reinsert it after the sector has been modified. Ex.

 

- Set bytes 20 to 24 inclusive, in sector 360 on drive 8 to 255 -

MODIFY_SECTOR 8,360,20,255,5,STA,SD

 

- Prompt the user, wait for and keypress and then set bit 7 in byte 80 in sector 10 on drive 3 -

MODIFY_SECTOR 3,10,80,%10000000,1,ORA,"INSERT DISK TO MODIFY"

 

 

DRIVE_TABLE - parameters 10

parameters 1 to 10: number (0-9) - drive number

 

This command sets up ramdrive 1.0's drive table. The drive table is a list of which drive to map a drive number to. Each parameter represents a drive numbered 0 through 9, so the drive number appearing in the first parameter will act as drive 0, the drive appearing in the second parameter will act as drive 1, and so on. This command is probably best explained with an example or two. If you have a real drive numbered drive